S h o r t S t o r i e s

// Tales from software development

The service did not respond to the start or control request in a timely fashion.

leave a comment »

I deployed a Windows Service based application last week and hit a problem that demonstrates that you just can’t take anything for granted…

I copied the installer to the customer’s test server and it installed without any problems. I changed a couple of settings in the service executable’s .config file according to what was required for the environment and then tried to start the service.

It was immediately obvious that something was wrong as the service normally starts without any delay. After about 20 seconds the Services console displayed an error message:

The service did not respond to the start or control request in a timely fashion.

The service writes to a log file so I opened Windows Explorer and navigated to the installation folder to view the log. I expected to see a newly created Logs folder and a log file for the current date but neither had been created. This customer is very focused on security and I wondered if they had changed the permissions on the service account so that it could not write the the file system.

I enabled the service application’s tracing feature and started SysInternals’ DbgView to see how far the application was getting during its startup. The DbgView window remained blank while I tried to start the service. This really had me scratching my head – it was almost as if the service executable wasn’t being executed at all.

Out of desperation I opened a command line window and typed “sc start service-name“. Thankfully I got a useful error message at last indicating that the .NET 2.0 Framework was not installed.

Yep, that would explain it.


Written by Sea Monkey

August 1, 2010 at 10:00 am

Posted in Debugging, Deployment

Tagged with ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: