If I create a Windows Service, is there a way to call that service from asp.net?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
By
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 http://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.