Cannot start the windows service

风流意气都作罢 提交于 2019-12-11 19:39:41

问题


I created a wcf library. then i write wcf service which do create or open a file and writes "hello world" in that file. then i added new project to add windows service. in that windows service onstart() method i call the wcf service. then i build and installed the service using installutil. the service was installed successfully. while i am starting the service in services.msc, it shows the following error

"the service on local computer started and then stopped some services stopped automatically. if they have no work to do, for example the performance logs, and alerts."

why am i getting this error. how to resolve this?


回答1:


(i)Clear the Application Log.

(ii)Use the debugger and trace the execution of the OnStart() method.

if these does not work,

1) Click Run Command from start button

2) Enter Services.msc then click OK,you will get all the services in your computer.

3) Select your service and right click on the service and select Properties

4) Goto Logon Properties a select Local System Account then click OK



来源:https://stackoverflow.com/questions/19063442/cannot-start-the-windows-service

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!