开发者

windows service cannot stop

开发者 https://www.devze.com 2023-02-14 20:38 出处:网络
Created a simple WCF service that basically logs to a db. the build is fine and created a msi ins开发者_如何学运维tall file for it.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号