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

  • Home
  • SEARCH
  • 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 6337557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:16:27+00:00 2026-05-24T19:16:27+00:00

Unable to access WCF Service from Client machine I have three projects : WCF

  • 0

Unable to access WCF Service from Client machine

  • I have three projects : WCF Service (VS-2008), Windows Service (VS-2008), Client (VS-2005)
  • The WCF service has netTcpBinding
  • This service is hosted as a windows service and not on IIS

The base address for both the service (WCF and Windows) is

net.tcp://localhost:8010/WCFService.Service1/

Now when i add a service reference to the client project which is on VS-2005, It updates my app.config file

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <bindings>
            <netTcpBinding>
                <binding name="netTcpEndPoint" closeTimeout="00:01:00" openTimeout="00:01:00"
                    receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false"
                    transferMode="Buffered" transactionProtocol="OleTransactions"
                    hostNameComparisonMode="StrongWildcard" listenBacklog="10"
                    maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="10"
                    maxReceivedMessageSize="65536">
                    <readerQuotas maxDepth="32" maxStringContentLength="8192"         maxArrayLength="16384"
                        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                    <reliableSession ordered="true" inactivityTimeout="00:10:00"
                        enabled="false" />
                    <security mode="Transport">
                    <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
                        <message clientCredentialType="Windows" />
                    </security>
                </binding>
            </netTcpBinding>
        </bindings>
        <client>
            <endpoint address="net.tcp://localhost:8010/WCFService.Service1/"
                binding="netTcpBinding" bindingConfiguration="netTcpEndPoint"
                contract="Client.Service1.IService1"
                name="netTcpEndPoint">
                <identity>
                    <servicePrincipalName value="host/server17.domain.com" />
                </identity>
            </endpoint>
        </client>
    </system.serviceModel>
</configuration>

And adds Service1.map file as

<?xml version="1.0" encoding="utf-8"?>
<ServiceReference>
    <ProxyGenerationParameters
        ServiceReferenceUri="net.tcp://server17:8010/WCFService.Service1/"
        Name="Service1"
        NotifyPropertyChange="False"
        UseObservableCollection="False">
    </ProxyGenerationParameters>
    <EndPoints>
        <EndPoint
            Address="net.tcp://localhost:8010/WCFService.Service1/"
            BindingConfiguration="netTcpEndPoint"
            Contract="Client.Service1.IService1"
            >
        </EndPoint>
    </EndPoints>
</ServiceReference>

When I call any of the service methods I get an error stating

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

At least it should be net.tcp://server17:8010/WCFService.Service1/

I have already tried to replace localhost with server17 in the client project… but no luck

What should I change to make it working? please help.

This is my WCF Service’s App.config which is same as windows service’s
app.config : as requested by Tim

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.web>
    <compilation debug="true" />
  </system.web>
  <system.serviceModel>
    <services>
      <service behaviorConfiguration="WCFService.ServiceBehavior" 
        name="WCFService.Service1">
        <endpoint address="" binding="netTcpBinding" bindingConfiguration="" 
          name="netTcpEndPoint" contract="WCFService.IService1" />
        <endpoint address="mex" binding="mexTcpBinding" bindingConfiguration=""
          name="mexTcpEndPoint" contract="IMetadataExchange" />
        <host>
          <baseAddresses>
            <add baseAddress="net.tcp://localhost:8010/WCFService.Service1/" />
          </baseAddresses>
        </host>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="WCFService.ServiceBehavior">
          <serviceMetadata httpGetEnabled="False" />
          <serviceDebug includeExceptionDetailInFaults="False" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
</configuration>
  • 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-24T19:16:28+00:00Added an answer on May 24, 2026 at 7:16 pm

    At a guess I’d check three things:

    1. When you add the service reference to your client, are you adding it from net.tcp://localhost:8010/WCFService.Service1/, or are you adding it from net.tcp://server17:8010/WCFService.Service1/?

    2. If you’re adding it from server17, try using the fully qualified name of the server – i.e., server17.mydomain.com or whatever it is.

    3. The connection error is probably related to the endpoint address you’re using – the client is passing in a serverPrincipalName of “host/server17.domain.com”, but you’re attempting to connect to localhost.

    No guarantees any of the above are the root cause, but it gives you a place to start.

    EDIT

    You specify the locahost in the baseAddress element, but you don’t specify anything in the address attribute of the endpiont element. That’s probably why it’s still going to localhost.

    Modify the config file for your service to either change the baseAddress to:

    <baseAddresses>
        <add baseAddress="net.tcp://server17:8010/WCFService.Service1/" />
    </baseAddresses> 
    

    or drop the baseAddresses and specify the address in your endpoint:

    <endpoint address="net.tcp://server17:8010/WCFService.Service1/"
              binding="netTcpBinding" 
              bindingConfiguration=""
              name="netTcpEndPoint" 
              contract="WCFService.IService1" />
    

    Give that a try.

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

Sidebar

Related Questions

I have a requirement to access the HttpContext.Current from with-in a RESTful WCF service.
i have the WCF web service within my solution. service has interface which implemeted
I have 2 classes in Cocoa, but am unable to access variables from one
I have created a windows service for the sole purpose of hosting a WCF
I am unable to consume messages sent via ActiveMQ from my Flex client. Sending
I have created one WCF service , which is working fine, now i want
I have a Data Access Layer, a Service Layer, and a Presentation Layer. The
I have a asp.net 2.0 web site with WCF service hosted inside it running
In a WCF service, I have two classes with the [DataContract] attribute. One of
Error: Unable to read data from the transport connection: A blocking operation was interrupted

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.