Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 954639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T00:14:54+00:00 2026-05-16T00:14:54+00:00

I have two Windows services written in C# following the same patterns and methodology.

  • 0

I have two Windows services written in C# following the same patterns and methodology.

Both services were development tested against a Windows 7 VM and QA tested on Windows Server 2008 VM. Both services have been installed and uninstalled many times under these test environments without issue, however upon installing in the production environment (Windows Server 2008) one of the two services refuses to start.

To install the services we are using InstallUtil.exe with ServiceInstaller and ServiceProcessInstaller components attached to the service.

By all appearances, the failing service installs successfully. InstallUtil.exe reports success and the service appears in the Services snapin. You can also locate the service in the registry under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Blah Blah. However, if you attempt to start the service you get the following:

net start blah.blah.exe
“The service name is invalid.”

…or going through the Services snapin…
“Windows could not start the “Blah Blah” service on Local Computer. Error 1053: The service did not respond to the start or control request in a timely fashion.”

I have added some event logging to the constructor of the service class failing service, but it does not appear to get called.

As this is a production box, there is no Visual Studio on the box and remote debugging is out of the question.

Is there any other way for me to gain debugging info on why the failing service isn’t starting?

Is there any other obvious-ish reason that I might see this kind of issue?

Edit: I should have also mentioned.. The only other evidence of a problem in the Windows Event Viewer is two messages in the System log from the Service Control Manager:

“A timeout was reached (30000 milliseconds) while waiting for the Blah Blah service to connect.

“The Blah Blah service failed to start due to the following error:
The service did not respond to the start or control request in a timely fashion.”

Edit: Resolved
The issue ended up being a combination of a configuration mistake and a bug that was hiding it. See my answer below for more details.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T00:14:54+00:00Added an answer on May 16, 2026 at 12:14 am

    Jeopardy Answer: “How might invalid custom configuration combined with a bad global exception handler manifest itself in a .NET Windows service?”

    Figured it out.

    The root cause of the problem was an invalid custom configuration section in the app.config. We use a custom configuration section to configure the service from the app.config and the assembly and namespace of the ConfigurationSection derived class had changed recently.

    As it turns out, our production configuration was looking for the definition of the custom ConfigurationSection in the wrong assembly and the exception thrown when failing to instantiate it was getting hidden by a bug where exceptions caught early in the life of the service would attempt to be logged to the custom log rather than the Application event log. (Since the event log source did not exist on the custom event log, this would throw another exception from the global exception handler and the service would die in the constructor.)

    This second exception did not get logged anywhere and we only found it through code inspection.

    The resolution was to fix the configuration and to modify the global exception handler to only attempt to write to the Application event log using the service name as the event log source. (InstallUtil registers the service name as an event log source on the Application log.)

    Thanks for the help everyone! Sorry this particular issue ended up being so specific to our setup.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have configured Service Broker communication between two SQL Server 2008 instances using Windows
I have two websites hosted on the same IIS server. SiteA contains WCF services
I have written two different applications running as windows services. Each application represents one
I have two Windows services, the first one written in C# and the second
Let's say I have two windows services running. One service is 'Polling' - it
I have a Windows Azure site which is deployed to two separate hosted services.
Two Windows processes have memory mapped the same shared file. If the file consists
I have Windows Service written in C#. It starts two threads, one is pooling
I have two Windows services, we'll call X and Y. X handles the general
I have two computers with Windows Server 2003. One computer has some shared folders

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.