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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:07:11+00:00 2026-05-22T15:07:11+00:00

I have a WCF service that is hosted inside a Windows Service. The Windows

  • 0

I have a WCF service that is hosted inside a Windows Service. The Windows Service has a OnStart method like this:

protected override void OnStart(string[] args)
{
  serviceHost = new ServiceHost(typeof (RouterService));
  serviceHost.Open();
}

It’s quite minimal now, since I’m trying to find the problem. Since I have not put any error handling here, any exceptions at this point should have stopped the service from starting up properly. It would start, and then automatically stop again immediately.

My config file for the WCF service looks like this:

<?xml version="1.0"?>
<configuration>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
  </startup>
  <system.serviceModel>
    <services>
      <service name="WcfService.RouterService"
               behaviorConfiguration="serviceBehavior" >
        <endpoint address="RouterService" contract="WcfService.IRouterService" binding="wsHttpBinding" bindingConfiguration="NoSecurity" />
        <endpoint address="mex" contract="IMetadataExchange" binding="mexHttpBinding" />
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8000"/>
          </baseAddresses>
        </host>
      </service>
    </services>
    <bindings>
      <wsHttpBinding>
        <binding name="NoSecurity">
          <security mode="None" />
        </binding>
      </wsHttpBinding>
    </bindings>
    <behaviors>
      <serviceBehaviors>
        <behavior name="serviceBehavior" >
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="true"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
</configuration>

In addition, I have added the NETWORK SERVICE user (who the service is running as to be able to listen to Http at the specified port:

netsh http add urlacl url=http://+:8000/ user="NETWORK SERVICE"

Now, in the client, I choose Add Service Reference. I can find the server, and VS also manage to create the configuration and make the proxy files. Then inside the client, I make an instance of the proxy, and open it. Everything still fine. But upon calling the first method on proxy, I get the following exception:

The HTTP service located at http://localhost:8000/RouterService is too busy.

I know that my client is the only thing that is trying to connect to this service, so why do I get this error message then? And how can I fix this? It does not time out when it tries to call the method, it throws the exception almost immediately.

EDIT

Ok, now I found out that my TestServer (not the Windows Client one, but a console application) also gives the same error. Earlier today it didn’t, and neither the WCF service or TestServer are changed.

Then I tried changing the port to 8080 instead of 8000, and it worked. Then I tried the same for the Windows Service, and that also worked (after running the netsh http command on the new port)

So something has happened to http on port 8000 for some reason. I have tried restarting the system also of course.

This is puzzling me, so if anyone has any idea what is going on here I would appreciate it.

  • 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-22T15:07:12+00:00Added an answer on May 22, 2026 at 3:07 pm

    Ok, after a long time of trying to figure out what happened here, I found the solution.

    After I created the windows service, and tried to start it I couldn’t because I had to register the NETWORK SERVICE user to listen on http post 8000 first. I therefore ran this command:

    netsh http add urlacl url=http://+:8000/RouterService user=”NETWORK SERVICE”

    It gave a successful result, but then I tried starting the service, and got the same error message. Then I ran the same command without RouterService specified:

    netsh http add urlacl url=http://+:8000/ user=”NETWORK SERVICE”

    It gave a successful result, and now my windows service started up without any problems, but I got the problems mentioned in the question above.

    It seems that the first call to netsh causes all of these problems. I tried removing it again with this command:

    netsh http delete urlacl url=http://+:8000/RouterService

    And then everything worked perfectly.

    A bitch to debug this since the exception had nothing to do with the actual problem, so I hope this question can save someone else a couple of hours 🙂

    • 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 running.Inside this service I have hosted some service (WCF).
I have a WCF service that is hosted in a windows application. The service
We have created a WCF service hosted in a windows service that handles Authentication
I have a WCF webservice that is hosted in IIS 7.5. Inside the Service
I have a WCF service that is hosted in a Windows Service. Clients that
I have created a WCF service that is hosted using windows service. The windows
I have a WCF service hosted in a Windows service that I set to
I have a WCF service that is hosted on a Windows Service. Now I
I have a WCF service that is hosted in a windows service. It shares
I have a wcf service that is hosted in IIS. This service launches some

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.