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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:39:33+00:00 2026-05-14T04:39:33+00:00

I have six wcf services that I’m hosting in a windows service. Everything works

  • 0

I have six wcf services that I’m hosting in a windows service. Everything works great on my machine (Windows 7) (Edit: when hosted in Cassini, but not when running through the windows service) but when I try it in production (Windows Server 2003) I cannot connect to one of my six services, ReportsService.

I figured I must have a typo, but everything looks right. I’ve even rewritten that section of the config file just to be sure.

I’ve turned on WCF tracing, but it never shows the call to my service; nothing helpful in there.

I tried connecting to the port (9005) with telnet, but it failed. I can connect to all other services (ports 9001-4 and 9006) just fine.

I thought that maybe there was a problem with port 9005, so I changed it to 9007 and still couldn’t connect. I had one of my working services host on 9005 and it actually worked fine. So I’m pretty sure there’s nothing wrong with the port or any firewall settings. Whatever port I tell ReportsService to use fails.

Now I’m out of ideas. It seems like it’s not hosting that one service, but I cannot get any information about why or what’s wrong. Any ideas on what I could try to get that information? Or what might be wrong?

The unhandled System.ServiceModel.EndpointNotFoundException I get when running my client is:

Could not connect to net.tcp://localhost:9005/ReportsService. The
connection attempt lasted for a time span of 00:00:01.0937430. TCP error
code 10061: No connection could be made because the target machine
actively refused it 127.0.0.1:9005. .

My host’s config file contains:

<!-- Snipped other services to simplify for you. -->
<endpoint binding="netTcpBinding" bindingConfiguration="customTcpBinding" contract="ServiceContracts.IReportsService" />
<endpoint binding="netTcpBinding" bindingConfiguration="customTcpBinding" contract="ServiceContracts.IUpdateData" />

IReportService is the one I’m having trouble with. I get a proxy to IReportsService with the following code, where Server is the name of the hosting machine:

return new ChannelFactory<IReportsService>("").CreateChannel(new EndpointAddress(string.Format("net.tcp://{0}:9005/ReportsService", Server)));

My client config file contains:

<system.serviceModel>
  <bindings>
    <netTcpBinding>
      <binding name="customTcpBinding" maxReceivedMessageSize="2147483647">
        <readerQuotas maxNameTableCharCount="2147483647" maxStringContentLength="2147483647"/>
        <security mode="None"/>
      </binding>
    </netTcpBinding>
  </bindings>
  <behaviors>
    <serviceBehaviors>
      <behavior name="ServiceBehavior">
        <serviceMetadata httpGetEnabled="True"/>
        <serviceDebug includeExceptionDetailInFaults="True" />
        <serviceThrottling maxConcurrentCalls="30" maxConcurrentInstances="30" maxConcurrentSessions="1000" />
      </behavior>
    </serviceBehaviors>
  </behaviors>
  <services>
    <!-- Snipped other services to simplify for you. -->
    <service behaviorConfiguration="ServiceBehavior" name="WcfService.ReportsService">
      <endpoint address="ReportsService" binding="netTcpBinding" bindingConfiguration="customTcpBinding"
        contract="ServiceContracts.IReportsService" />
      <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
      <host>
        <baseAddresses>
          <add baseAddress="net.tcp://localhost:9005" />
        </baseAddresses>
      </host>
    </service>
    <service behaviorConfiguration="ServiceBehavior" name="WcfService.UpdateData">
      <endpoint address="UpdateData" binding="netTcpBinding" bindingConfiguration="customTcpBinding"
        contract="ServiceContracts.IUpdateData" />
      <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
      <host>
        <baseAddresses>
          <add baseAddress="net.tcp://localhost:9006" />
        </baseAddresses>
      </host>
    </service>
  </services>
</system.serviceModel>

I’ve tried to keep things simple with the code snippets above, but if you would like to see more just ask and I’d be happy to provide anything that’ll help.

  • 1 1 Answer
  • 3 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-14T04:39:34+00:00Added an answer on May 14, 2026 at 4:39 am

    I’m an idiot. I forgot to create and open a ServiceHost for the ReportsService in my windows service…. I thought everything worked fine on my machine, but really it only worked when hosted in Cassini, not when I actually installed the windows service on my machine. That’s what finally tipped me off.

    Thanks for the suggestions and for trying to help!

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

Sidebar

Related Questions

I have near about six Activities and a service class with BroadcastReceiver that run
I have six SQL queries that I script though R that each take a
I have six tabs on my Windows application. I need to put tab #6
i have this code, that works without any problem: <script> $(document).ready(function () { $(.block1).click(function
In one of my Activities I do have up to six different AsyncTasks that
I have six checkable push buttons in QT, and I want it so that
so i have six catagories that entries in my database are tagged against. When
If I have a dictionary that looks like: {'first': [ {'red': ['six', 'three', 'seven',
I'm wondering if anyone can help me. I have a wcf service running over
I have six boolean flags that are independent of each other so there are

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.