Stopping and Starting a Windows Service

G

Guest

Hi

I have developed a Windows Service in VB.Ne

When I try to start the Service it tells me that it cannot start as there may not be any work to do
When I comment out below line of code in my OnStart event....
objEventLog.EnableRaisingEvents = Tru
....It starts fin

I have the same issue when stopping the service because of below line of code in my OnStop even
objEventLog.EnableRaisingEvents = Fals

I am using .NET 2003 and I have declared objEventLog as..
Friend WithEvents objEventLog As System.Diagnostics.EventLo

Does anyone have any idea as to why this is causing an issue when starting and stopping the service

Thanks
C
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top