Is there a built-in method to restart a WCF service that I can invoke from my client? I have a static constructor and also it would help me while I’m testing my application.
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.
No. That would be a serious security vulnerability, if someone could somehow restart your service from a non-administrator account (a SL client just sends the request to the service over HTTP, or a non-authenticated TCP socket in SL4).
You should be able to restart the service by recycling the application pool for the application. Touching web.config should do the trick (open the file in notepad, save it, even without any modifications).