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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T04:41:15+00:00 2026-06-19T04:41:15+00:00

I am having a puzzling issue that I can’t find an answer for. I

  • 0

I am having a puzzling issue that I can’t find an answer for. I am trying to Upload a large ammount of data to a WCF service and it will return a 413 error on first and subsequent tries until a request under the 64kb limit is sent after that the large data request is accepted.
I have already extended the maxReceivedMessageSize and maxStringContentLength elements in my binding and the this fixes the issue when sending a request after an initial small request (if these aren’t extended a different error 400 is returned not a 413).

My system is an ASP.NET 3.5 application running on IIS 7 and the WCF service uses custom binding, SOAP messages and client/server certificates.

Basically the order to reproduce is as follows (tested on 2 servers)

  • IIS7 worker process starts up
  • send request greater than 64kb: returns 413 error
  • send any more requests greater than 64kb: returns 413 error
  • Send request less than 64kb: returns 200 and valid soap response
  • send request greater than 64kb: returns 200 and valid soap response

If the maxReceivedMessageSize and maxStringContentLength elements aren’t increased the following happens:

  • IIS7 worker process starts up
  • send request greater than 64kb: returns 413 error
  • send any more requests greater than 64kb: returns 413 error
  • Send request less than 64kb: returns 200 and valid soap response
  • send request greater than 64kb: returns 400 error

Debugging suggests that when receiving the 413 error the server hasn’t really initialized my service and once a small request comes in it is initialized and pays attention to my binding rules and then allows for large data quantities.

I suspect this is an issue inside the WCF library and may be fixed by upgrading but that isn’t really an option and a need a work around. I was thinking along the lines of on application startup initialize the service in question some how or maybe increase the default WCF maximum received bytes somehow

From My web.config:

<system.web>
    <httpRuntime maxRequestLength="65536" executionTimeout="1800"/>
</system.web>
<system.webServer>
    <security>
        <requestFiltering>
            <requestLimits maxAllowedContentLength="67108864" />
        </requestFiltering>
    </security>
</system.webServer>
<system.serviceModel>
    <services>
        <service behaviorConfiguration="ServiceTlsBehavior" name="ELSLookupServiceTLS">
            <endpoint address="" binding="customBinding" bindingConfiguration="TlsBinding" contract="Lookup" />
        </service>
    </services>
    <bindings>
        <customBinding>
            <binding name="TlsBinding" closeTimeout="00:04:00" openTimeout="00:12:00" receiveTimeout="00:15:00" sendTimeout="00:05:00">

                <textMessageEncoding>
                    <readerQuotas maxStringContentLength="2147483647" maxArrayLength="2147483647" />
                </textMessageEncoding>
                <httpsTransport requireClientCertificate="true" maxReceivedMessageSize="6553600" maxBufferPoolSize="6553600" maxBufferSize="6553600" />
            </binding>
        </customBinding>
    </bindings>
    <behaviors>
        <serviceBehaviors>
           <behavior name="ServiceTlsBehavior">
                <serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" />
                <serviceDebug includeExceptionDetailInFaults="true" />
                <dataContractSerializer maxItemsInObjectGraph="6553600"/>
            </behavior>
        </serviceBehaviors>
    </behaviors>
 </system.serviceModel>

My Service Implementation:

[ServiceBehavior(AddressFilterMode = AddressFilterMode.Any)]
public class ELSLookupService : Lookup
{
     //serivce call implemented here
}
  • 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-06-19T04:41:16+00:00Added an answer on June 19, 2026 at 4:41 am

    Okay found the problem and for reference sake should someone run into this here is what it was: the error is realated to initial SSL traffic and IIS and seems unrelated to WCF (I could be wrong on that).

    The uploadReadAheadSize setting in IIS must be increased.

    In IIS7 you can extend this in the web.config under the serverRuntime element, see:
    http://www.iis.net/configreference/system.webserver/serverruntime

    In IIS6 it might also popup and it is apparently an IIS per site setting.

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

Sidebar

Related Questions

Having a weird issue. I'm new to Macs and have a windows VM that
Hey. Having a rather puzzling issue with my dropdown menus and iframes. I have
Im having an issue with a Stored Procedure I have written, I can call
Having successfully got a WCF service and client to talk to one another using
I've run into a very strange issue that I'm having a tough time fixing.
Having issue with slider navigation. Works perfectly fine when there are no other unordered
I'm trying to set up a FuelPHP app, and I've run into a puzzling
I have this small app that runs on any phone having API level 6
Having a strange issue with the TabContainer in the AJAX Toolkit. We have several
I was having problems pushing data from my development db to Heroku. I decided

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.