Reputation: 3884
I know this question has been asked twice.But both of them didn't help me.My code is working fine like onstart is for initialization the timers etc. I have C# windows service which is running as some accnt not local. Im currently using CCtray to deploy and start the service so it doesn't give me any error. But sometimes manually I need to stop and start it again.And that's where I see this msg. I know microsoft has a hotfix for sp1 but I don't know whether they have for sp2.And my server where service is located is sp2.
Upvotes: 1
Views: 2668
Reputation: 8662
One other reason is If you copy the DLL in 'debug' mode to installation folder this issue will come.What you need to do is Run the project in 'Release' mode copy the DLL or directly form Release folder rather than Debug folder,,and copy that DLL in to installation folder,it will work.You can see the reduction in size of DLL ,it will not contain any debug symbols and like that
Upvotes: 0
Reputation: 74652
I know microsoft has a hotfix for sp1 but I don't know whether they have for sp2.And my server where service is located is sp2.
If we made a hotfix for SP1, the fix is already in SP2. Also, don't do anything in the OnStart, start up a separate thread to do anything and respond to SCM requests as fast as possible.
Upvotes: 1