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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:34:43+00:00 2026-05-26T07:34:43+00:00

I’m trying to access a WCF service on a company network. I’m using the

  • 0

I’m trying to access a WCF service on a company network. I’m using the proxy and config file generated by svcutil. The code looks like this:

using (Client client = new Client())
{
    client.Open();
    client.DoStuff();
}

Client is the client class in the generated proxy code, meaning it’s derived from System.ServiceModel.ClientBase and implements the Contract interface.

And the config file looks like this:

<configuration>
    <system.serviceModel>
        <client>
            <endpoint address="net.tcp://Address"
                      binding="netTcpBinding"
                      bindingConfiguration="Config"
                      contract="Namespace.Contract"
                      name="name">
                <identity>
                    <servicePrincipalName value="Host" />
                </identity>
            </endpoint>
        </client>
        <bindings>
            <netTcpBinding>
                <binding name="Config"
                         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="None">
                        <transport clientCredentialType="None" />
                    </security>
                </binding>
            </netTcpBinding>
        </bindings>
    </system.serviceModel>
</configuration>

I get the exception “An existing connection was forcibly closed by the remote host” every time the code reaches client.Open(). What really bothers is that when I try it from another computer, there’s no exception. And on top of that, the config file used to have Transport security which was changed to None, and the computer where it works still has the old config file with

<security mode="Transport">
    <transport clientCredentialType="Windows"
               protectionLevel="EncryptAndSign" />
    <message clientCredentialType="Windows" />
</security>

whereas on the first machine and the server it’s

<security mode="None">
    <transport clientCredentialType="None" />
</security>

What can cause this? I’ve read numerous other questions here regarding this exception, but none seemed to resemble my issue.

SOLVED! I have set the security options in the wrong place.
The service was self hosted with ServiceHost, and the Security property wasn’t set, so it defaulted to something else than None.

  • 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-26T07:34:44+00:00Added an answer on May 26, 2026 at 7:34 am

    Check your Security settings for this project on your IIS (you are using IIS right?). I think it still says authentication type Windows.

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

Sidebar

Related Questions

I am trying to render a haml file in a javascript response like so:
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the

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.