Hi I made some changes in a windows service coding side(some class files related to that),,means i did coding to fetch version value from registry 开发者_JAVA百科in that class files,,,,After
Your OnStart method is most probably hanging. Did you recently add any of that threading/timer code.
Is your tracer logging any information? Can you write some debug code to log where you are getting to and what exceptions are being thrown?
So it looks like OnStart
is throwing an exception (in SpoER.Init()
?, and it has permissions problem as well), this is causing the service to try and stop straight away.
I would suggest following the exception information you have given to try and locate the problem. It would be even better to move the bulk of this code into a separate class so you can write a console app which shares the same code as the service. By using the console app you can easily debug it.
Now i got the mistake,,What actually i was doing is i am copying DLL created in the debug mode and copying into the Installer path..Actually what i need is i have to copy DLL obtained from the release mode and copy into the installer side
精彩评论