Services timeout in MMC despite continuing to run

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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.
 
Back
Top