Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to call a windows service from asp.net

If I create a Windows Service, is there a way to call that service from asp.net?

like image 252
mickyjtwin Avatar asked May 14 '09 05:05

mickyjtwin


1 Answers

By

"Call that service"

do you mean, manage the service? As in, Start, Stop, Restart etc? If so, then the answer is yes. There is a good article at www.csharp-examples.net that will show you how to use the ServiceController class.

If however, you mean send messages to it, as if it's a Web Service, then, the answer is, that depends on how you're exposing your service. Windows Services can host WCF services, so that would be a good option, if you wanted to expose your windows service to internet clients.

like image 107
Scott Ferguson Avatar answered Sep 27 '22 16:09

Scott Ferguson