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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:10:33+00:00 2026-05-13T16:10:33+00:00

I have a .NET windows service which acts as a host for some wcf.

  • 0

I have a .NET windows service which acts as a host for some wcf. In the OnStart method the service hosts are created and started. The service is configured to startup automatically. This works well on Windows 7 (32bit and 64bit) and it can be startet with “net start” on Windows XP Pro SP3. The service startup with “net start” command takes about 20 seconds.

But when Windows XP Pro SP3 is booting there’s a timeout message in the event log. The service itself does not fail to startup, though do its dependencies. The problem can be reproduced on various XP machines. Core count and memory does not have an influence. The updates are up to date.

Now it’s getting curious: I analyzed the trace and found out that the service is taking about 60 seconds for startup. Thus I’ve added a call to ReqestAdditionalTime(480000). But now the service takes slightly more than 480 seconds. The relation is obvious. The time is consumed in the following code section:

 var asyncResults = new List<IAsyncResult>();
 foreach (var host in myHosts)
   asyncResults.Add(host.BeginOpen(null, host));


  // wait until finished
  while (asyncResults.Count != 0)
  {
   IAsyncResult ar = asyncResults[0];
   if (!ar.IsCompleted) ar.AsyncWaitHandle.WaitOne(1000);
   if (ar.IsCompleted)
   {
        asyncResults.Remove(ar);
        var co = (ICommunicationObject)ar.AsyncState;

        try
        {
            co.EndOpen(ar);
        }
        catch (Exception ex)
        {
          ...
        }
   }
 }

Do you have any idea what’s happening here?

  • 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-13T16:10:33+00:00Added an answer on May 13, 2026 at 4:10 pm

    Hey, I found the resolution myself by doing some intensive Log-Research.

    In the event log there were some services, which started AFTER the timeout of my service has been reached. As my service is running as a sepecial user, I could detect two services, which where acutally triggered by my own service. Thus I added those to the services dependencies and it works.

    I wonder if there’s a documentation, where the dependencies of wcf are listed.
    As reference here are the services, my service is dependen on:

    • http
    • RPCSS
    • CryptSvc
    • HTTPFilter
    • RasMan

    Latter two where those causing the deadlock.

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

Sidebar

Related Questions

We have taken over some .NET 1.1 Windows Service code that spawns threads to
I have a Windows Service which exposes three sources of data via ADO.NET Data
I wrote a VB.NET Windows Service, which works fine. I have only one issue
I have a WCF service which is hosted in a Windows Service and has
I have a windows service (VB.NET) which downloads files from a server after a
I have a dot net windows service project which contains multiple services. This has
I have a Windows Service written in .NET C# which calls a COM component.
I have a windows service which is using a method from a class library
I'm running Windows 7 64-bit. I'm attempting to host a WCF service which will
I have a standard .NET windows service written in C#. Can it install itself

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.