Created a simple WCF service that basically logs to a db. the build is fine and created a msi ins开发者_如何学运维tall file for it. I installed the windows service and start it which works, however when i stop it i get this error:
"Could not stop the service1 service on local computer. The service did not return an error. This could be an internal windows error or an internal service error. If the problem persists, contact your system administrator."
There are a couple of ways to diagnose this:
If you haven't already, separate out the implementation of the windows service from the actual service executable. That way you can run / debug the code from a console or forms app easily.
If that doesn't reveal any answers, add verbose logging to the shutdown method to find out what is happening.
精彩评论