.net - My C# program running as Windows Service is blocking Windows XP from hibernation -


I have a Windows service in C #. It launches two threads, submitting a web service, the second monitor is waiting for a new job to come on the object. In addition, the main thread acts as a WCF service host by using NetNamedPipeBinding . This client allows the application to register callbacks and then returns the notifications back.

I have the problem that when Windows service is running, I can not run Hibernate or Standby on my computer running Windows XP, SP3. When I set Windows to Hibernate or standby, nothing happens then, at the moment when I turn off the service by going to the Service Manager, the system hibernation starts immediately.

ServiceBase can be expanded in the service category such as the HandlePower Event, Canapause EndContinu, etc. Set on the right ... there was no difference in it.

The question is, can the hibernation / standby block be blocked by moving forward?

You only mention that you have set CanHandlePowerEvent property correct I think that you will also have to handle OnPowerEvent and if queries are and if you are doing anything, although I do not know about it.

More details here:


Comments