Services timeout in MMC despite continuing to run

G

Guest

I had an error with the service I wrote where the MMC Services Manager would
hang, displaying the "starting" dialog box until a timeout message was
displayed. The service would then show a status of "starting" and have no
way of controlling the service from MMC. Of course, since the service was
managed by the system account, you could not use task manager to kill the
process and the only recourse was to reboot. The application still runs
fine, just disconnected from the MMC.

It seems that if you rename a service application within the VS.NET IDE, the
component designer code that responds to the MMC Services Manager gets
deleted.

Me.ServiceName = "your service name"
CType(Me.Timer1, System.ComponentModel.ISupportInitialize).EndInit()

This is true of version 7.0.9466, I don't know if it has been addressed in
later releases.
 
P

Phil Wilson

The ServiceName of the ServiceBase class must be the same as the service
name used when you installed it, and if you used a ServiceInstaller, that
name must match the ServiceInstaller ServiceName. Your code changes the
ServiceBase.ServiceName, so if you didn't uninstall/reinstall you have a
mismatch.
 

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