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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:18:29+00:00 2026-05-25T23:18:29+00:00

I have a VS 2010 solution containing a WCF service project and a unit

  • 0

I have a VS 2010 solution containing a WCF service project and a unit test project. The unit test project has a service reference to the WCF service.

Web.config for the WCF service project sets a number of binding attributes to other-than-default values:

web.config: (Specifically note maxBufferSize=”20000000“)

<basicHttpBinding>
    <binding name="basicHttpBindingConfig" maxReceivedMessageSize="20000000" maxBufferSize="20000000" maxBufferPoolSize="20000000">
      <readerQuotas maxDepth="32" maxArrayLength="200000000" maxStringContentLength="200000000"/>
      <security mode="TransportCredentialOnly">
        <transport clientCredentialType="Ntlm"/>
      </security>
    </binding>
</basicHttpBinding>

While examining this issue, I came to realize that the unit test project’s service reference support files do not contain the values I would expect (i.e. the values configured in the WCF service’s web.config):

configuration.svcinfo:
(Specifically note maxBufferSize="65536")

  <binding hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" messageEncoding="Text" name="BasicHttpBinding_IBishopService" textEncoding="utf-8" transferMode="Buffered">
    <readerQuotas maxArrayLength="16384" maxBytesPerRead="4096" maxDepth="32" maxNameTableCharCount="16384" maxStringContentLength="8192" />
    <security mode="None">
      <message algorithmSuite="Default" clientCredentialType="UserName" />
      <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
    </security>
  </binding>

Deleting and re-creating the service reference or updating the service reference re-creates the files, but I still end up with the same values.

Why?

Update

Here’s the app.config of the client

<binding name="BasicHttpBinding_IMyService" closeTimeout="00:01:00"
                    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                    allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
                    maxBufferSize="200000000" maxBufferPoolSize="200000000" maxReceivedMessageSize="200000000"
                    messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
                    useDefaultWebProxy="true">
                    <readerQuotas maxDepth="32" maxStringContentLength="200000000" maxArrayLength="200000000"
                        maxBytesPerRead="200000000" maxNameTableCharCount="200000000" />
                    <security mode="None">
                        <transport clientCredentialType="None" proxyCredentialType="None"
                            realm="" />
                        <message clientCredentialType="UserName" algorithmSuite="Default" />
                    </security>
                </binding>
  • 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-25T23:18:30+00:00Added an answer on May 25, 2026 at 11:18 pm

    Same issue here and no solution after half a day messing about with config files… Changing automatically generated files is usually frowned upon, so my feeling says that “there has got to be a better way, Dennis”.

    UPDATE: I got my problem fixed by removing the name attribute in the binding configuration.
    So your current web.config is looking like this

    <basicHttpBinding>
      <binding name="basicHttpBindingConfig" maxReceivedMessageSize="20000000" maxBufferSize="20000000" maxBufferPoolSize="20000000">
        <readerQuotas maxDepth="32" maxArrayLength="200000000" maxStringContentLength="200000000"/>
        <security mode="TransportCredentialOnly">
          <transport clientCredentialType="Ntlm"/>
        </security>
      </binding>
    </basicHttpBinding>
    

    would become

    <basicHttpBinding>
      <binding maxReceivedMessageSize="20000000" maxBufferSize="20000000" maxBufferPoolSize="20000000">
        <readerQuotas maxDepth="32" maxArrayLength="200000000" maxStringContentLength="200000000"/>
        <security mode="TransportCredentialOnly">
          <transport clientCredentialType="Ntlm"/>
        </security>
      </binding>
    </basicHttpBinding>
    

    I think you only need to this at the client-side. By removing the name attribute, you essentially change the default basicHttpBinding configuration for your app, as far as I understand it. Credits for this solution here.

    Another update: if you name your service configuration correctly (including the namespace) it will pick up the binding configuration. So instead of

    <service name="ServiceName">
    

    you need

    <service name="My.Namespace.ServiceName">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Visual Studio 2010 MVC 3 web solution containing a number of
I have a Visual Studio 2010 solution that contains a WCF service project. When
We have a Visual Studio 2010 solution that has over 120 projects that reference
So I have a VS 2010 solution containing one ASP.NET MVC 3 project and
I have a solution in Visual Studio 2010 containing 6 projects (1 web application,
I'm using Visual Studio 2010, and I have a solution containing 2 C++ static
I have a VS solution containing several projects. While debugging a particular project all
I have a Visual Studio 2010 solution with 8 projects. It also has a
I have a Visual Studio 2010 solution containing several C# projects, with Resharper 5.1
I have a VC++ 2010 solution with multiple project, one of which is a

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.