Microsoft Knowledge Base Email Alertz

KBAlertz.com: Fixes the problem when you try to stop or pause the Windows service and the Windows service takes more time to stop or pause than the default configured time.

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]

Search KbAlertz

Advanced Search

Webmasters
Put kbAlertz on your website.
[ Click Here for more! ]





ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
The ad says 3 - but KBAlertz referrals get
** SIX MONTHS FREE **


Bug Tracking Software
For bug tracking software or defect tracking software or issue tracking software, visit Axosoft.


Community Site



We Send hundreds of thousands of emails using ASP.NET Email



Expert Web Design & Graphic Design
Design44.com

ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
The ad says 3 - but KBAlertz referrals get
** SIX MONTHS FREE **




Mentioned In








Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks




Article ID: 839174 - Last Review: March 29, 2007 - Revision: 2.2

FIX: You receive an "Error 1053: The service did not respond to the start or control request in a timely fashion" error message when you stop or pause a managed Windows service

On This Page

SYMPTOMS

When you stop or pause a managed Microsoft Windows service, and the process of stopping or pausing the service takes more time than the default configured time, you receive the following error message:
Could not stop the Windows service name service on Local Computer.
Error 1053: The service did not respond to the start or control request in a timely fashion.
Note Windows service name is a placeholder for the name of the Windows service that you have created.

CAUSE

The ServiceBase class calls the OnStop method directly from the Service command handler that is defined in the ScDispatcherLoop of the Advapi32.dll file. After 30 seconds, if the ScDispatcherLoop thread is not ready to receive a new service command from the service control manager, Windows Service Controller marks the service as "time out." Therefore, you receive this error message.

RESOLUTION

To resolve this problem, obtain the latest service pack for the Microsoft .NET Framework 1.1. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
885055  (http://kbalertz.com/Feedback.aspx?kbNumber=885055/ ) How to obtain Microsoft .NET Framework 1.1 Service Pack 1

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section. This problem was first corrected in Microsoft .NET Framework 1.1 Service Pack 1.

MORE INFORMATION

Steps to reproduce the behavior

  1. Create a Windows Service project. To do this, follow these steps:
    1. Use Microsoft Visual Basic .NET to create a Windows Service project. Name the Windows service SampleWS.
    2. In the Properties window of SampleWS, set the CanPauseAndContinue property, the CanShutDown property, and the CanStop property to True.
    3. Set the ServiceName property to SampleWS.
    4. In the code view of the Service1.vb file, add the following code at the beginning of the file to import the System.Threading namespace into the project.
      Imports System.Threading
    5. Add an OnPause method to the Service1.vb file.
    6. Add the following code to the OnStop method and to the OnPause method.
      Thread.Sleep(40000)
    7. Add the ServiceProcessInstaller1 installer and the ServiceInstaller1 installer to your SampleWS project.
    8. In the Properties window of the ServiceProcessInstaller1 installer, set the Account property of the ServiceProcessInstaller1 installer to LocalSystem.
    9. In the Properties window of the ServiceInstaller1 installer, set the StartType property to Automatic.
    10. Build the SampleWS application.
  2. Create a Setup project, and then add the output of the SampleWS application to the Setup project.
  3. Build the SampleWS solution.
  4. Locate the Setup1.msi file. This file is located in the Setup1 project folder that was created in step 2.
  5. Double-click the Setup1.msi file to install the SampleWS Windows service.
  6. Click Start, click Run, type services.msc in the Open box, and then click OK. The Services Microsoft Management Console (MMC) snap-in opens.
  7. In the right pane, locate the SampleWS service, and then start the service.
  8. Stop or pause the SampleWS service.
You notice the problem that is mentioned in the “Symptoms” section.

For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
824684  (http://kbalertz.com/Feedback.aspx?kbNumber=824684/ ) Description of the standard terminology that is used to describe Microsoft software updates

REFERENCES

For more information about how to create a Windows service, visit the following Microsoft Developer Network (MSDN) Web site:
http://msdn2.microsoft.com/en-us/library/aa983583(VS.71).aspx (http://msdn2.microsoft.com/en-us/library/aa983583(VS.71).aspx)

APPLIES TO
  • Microsoft .NET Framework 1.1
Keywords: 
kbqfe kbhotfixserver kbnetframe110sp1fix kbserviceprocess kbservice kbbug kbfix kbnetframe110presp1fix KB839174
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate

Be the first to leave feedback, to help others about this knowledge base article.

(Optional) Name

(Optional) Public URL Or Email

Comments
No HTML -- Text Only Please