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 3223292
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T16:05:24+00:00 2026-05-17T16:05:24+00:00

So I have a C# windows service that on some systems where there is

  • 0

So I have a C# windows service that on some systems where there is no internet access won’t start. It tries to start, but times out before the service is started. I’m unable to reproduce the issue in any development environment, but have seen it several times on other systems(usually w2k3).

When I put my service into a debug mode the first thing that I do is create a log file on the local pc, but this file is never being created so I believe that the OnStart code is never even being called.

On one of the systems we saw an Event Log entry which led us to this KB article: http://support.microsoft.com/kb/317541

So, by following the article by stopping the root certificate update service or connecting the device to the internet our service would now start. The other interesting thing is we have 3 services all start with almost identical code yet it’s always a particular one of the 3 that fails to start. Here is our code from the OnStart method:

if (args.Length > 0)
        {
            if (args[0].ToLower().Equals("debug"))
            {
                string AppLog = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name;

                string locallogpath = Settings.Settings.ServiceLogFileLocation.ToString();
                if (!Directory.Exists(locallogpath))
                {
                    Directory.CreateDirectory(locallogpath);
                }
                LogFileName = Path.Combine(locallogpath, AppLog + ".htm");
                try
                {
                    _logFile = new StreamWriter(new FileStream(LogFileName, System.IO.FileMode.Create));

                    _logFile.WriteLine(htmlHeader + "<span class=lognormal>Service Started!</span><br>");
                    _logFile.Close();
                }
                catch { }

                IsDebug = true;
            }
        }

My question is what could we possibly be doing that would cause the root certificate update to occur hence failing when no internet connection is available?

  • 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-17T16:05:25+00:00Added an answer on May 17, 2026 at 4:05 pm

    Are there any certificate signed assemblies involved in running this service? Those could trigger a sequence of events in verifying signatures which could very well result in Windows needing to check the status of root certificates.

    My guess is, if you need to run the affected service on a non-connected server, your only choice is to keep the root certificate update service stopped.

    I’d guess your logging code has nothing to do with it.

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

Sidebar

Related Questions

I have a windows service that generates logs as it does some execution. I
Scenario I have a windows service written in C# that performs some processing based
I have a Deplhi based Windows Service that, on installation, parses some command line
We have taken over some .NET 1.1 Windows Service code that spawns threads to
I have a windows service that runs fine, but I have to have it
I have created a C# .Net windows service. There are some configuration files which
I have a windows service that runs various system monitoring operations. However, when running
I have a Windows service that runs implementations of a framework across multiple threads.
I have a windows service that has a custom configuration section. In the configSectionHandler
I have a Windows service that runs as a logged-in user (local admin). During

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.