Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run console application on host server

I've created a c# console app that uses the class HttpListener on some random port. The app listens to http post requests and performs some operations on mySQL database according to the details of the request.

At this point I wish to upload this application and the DB to a host server. What would be the best practice for it?

  1. should I convert the .exe to .aspx that processes http requests on port 80? (my intuition told me that a console app would run faster than an .aspx page, but it might be wrong)
  2. should I convert it to windows service? Is it possible? Is there a point to it? If I do, can I run it on a web hosting server?

Thanks for the help!

like image 505
Daniel Avatar asked Apr 10 '26 11:04

Daniel


1 Answers

Best pratice would be a windows services, it is allways running when the server is up. A web project is would only run when you have request to a page in the project, because you have your own webserver this would be a little stange.

like image 192
Peter Avatar answered Apr 11 '26 23:04

Peter



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!