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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T14:24:17+00:00 2026-05-31T14:24:17+00:00

I prepared a wcf service host and configured with some binding information below. <system.serviceModel>

  • 0

I prepared a wcf service host and configured with some binding information below.

<system.serviceModel>
  <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
  <standardEndpoints>
    <webHttpEndpoint>
    <standardEndpoint name="" helpEnabled="true" automaticFormatSelectionEnabled="true" />
    </webHttpEndpoint>
  </standardEndpoints>
  <bindings>
    <netTcpBinding>
    <binding name="NetTcpBinding" closeTimeout="00:02:00" openTimeout="00:02:00"
      receiveTimeout="00:20:00" sendTimeout="00:02:00" transactionFlow="true"
      transferMode="Buffered" maxBufferPoolSize="2147483647" 
      maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
      <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
        maxArrayLength="2147483647" maxBytesPerRead="2147483647" 
        maxNameTableCharCount="2147483647" />
      <security mode="None">
      <transport protectionLevel="None" />
      </security>
    </binding>
    </netTcpBinding>
  </bindings>
  <behaviors>
    <serviceBehaviors>
    <behavior name="tcpServiceBehavior">
      <serviceMetadata httpGetEnabled="false" />
      <serviceDebug includeExceptionDetailInFaults="true" />
    </behavior>
    </serviceBehaviors>
  </behaviors>
  <services>
    <service behaviorConfiguration="tcpServiceBehavior" name="MyClass">
    <endpoint address="" binding="netTcpBinding" bindingConfiguration="NetTcpBinding" contract="IMyClass">
      <identity>
      <dns value="localhost" />
      </identity>
    </endpoint>
    <endpoint address="mex" binding="mexTcpBinding" contract="IMetadataExchange" />
    <host>
      <baseAddresses>
      <add baseAddress="net.tcp://localhost:8732/Design_Time_Addresses/MyService/MyClass" />
      </baseAddresses>
    </host>
    </service>
  </services>
</system.serviceModel>

And instantiate with the code below:

ServiceHost wcfHost = new ServiceHost(typeof(MyClass));
wcfHost.Open();

Using QuickWatch checked it out and verified the configuration values. Then, I added Service Reference on “net.tcp://localhost:8732/Design_Time_Addresses/MyService/MyClass” to an other project. So, the new config file below has been created in the client project.

<system.serviceModel>
  <bindings>
    <netTcpBinding>
      <binding name="NetTcpBinding_IMyClass" 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="Windows" protectionLevel="EncryptAndSign" />
          <message clientCredentialType="Windows" />
        </security>
      </binding>
    </netTcpBinding>
  </bindings>
  <client>
    <endpoint address="net.tcp://localhost:8732/Design_Time_Addresses/MyService/MyClass" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IMyClass" contract="IMyClass" name="NetTcpBinding_IMyClass">
      <identity>
        <dns value="localhost" />
      </identity>
    </endpoint>
  </client>
</system.serviceModel>

The problem is the binding configuration of host can’t come to client. If I change client configuration it doesn’t affects. For example, changed maxStringContentLength value from 8192 to 2147483647, then, saw that client has been instantiated with correct config but, operated with old config. Searched “8192” in solution and found in .svcinfo files as XML scheme. How can I solve this weird situation?

  • 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-31T14:24:19+00:00Added an answer on May 31, 2026 at 2:24 pm

    Right click the service reference and “Update” the it and VS will regenerate the svcinfo files, or you could avoid this issue entirely by not using VS to create the service proxy and instead generating your own service proxy by hand (considered a best practice as far as I know). As you already noted, “Add Service Reference” is not smart enough to take all those configuration values from the service when creating a client.

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

Sidebar

Related Questions

I have heard that prepared statements with SQLite should improve performance. I wrote some
I have a WCF service that uses ODP.NET to read data from an Oracle
I prepared a small test case below. My problem is when i right click
I am trying out prepared statements, but the below code is not working. I
I'm creating a WCF service which exposes an object graph which is expected to
I prepared a schema.yml -you can find below-. When i build it, build sql
I have an iPhone simulator app as client and WCF-REST, json encoded service running
I am trying to write a WCF service that can send mp3 files to
I want to use prepared statement to insert and update data in mysqli, Below
I'm using mysqli prepared statements. Should I still sanitise the user input with 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.