Request Entity Too Large but only with HTTPS RRS feed

  • Question

  • Hello,

    I have a WCF service that keeps throwing a 413 (Request Entity Too Large) but only when using HTTPS.  When put under HTTP, everything works perfectly which tells me there is some issue, unknown to me, with HTTPS. 

    Now, for the things that I've already tried:

    Every size property (maxBufferSize, maxReceivedMessageSize, etc) in my WCF config is set to 2147483647.
    maxRequestEntityAllowed was set to 4294967295 via IIS's Configuration Editor.
    uploadReadAheadSize was set to 2147483647 via IIS's Configuration Editor.
    A location section with the path to our site and overrides were added in the applicationHost.config of IIS.
    All values in IIS, Request Filtering -> Edit Feature Settings, were modified to be 2147483647.

    In addition, WCF logs don't even show the failed request.

    Any advice would be greatly appreciated.


    Thursday, August 23, 2018 7:11 PM

All replies

  • Of course, you know that the data being sent over HTTPS is encrypted, right? The encryption of the data must be increasing the size of the payload. You may have to look into WCF data chunking.

    Friday, August 24, 2018 8:52 AM
  • Yes, I am fully aware that HTTPS is encrypted.  As far as WCF data chunking, unfortunately that would cause us to alter the service which isn't something that we can do.  This service is heavily relied upon by many of our apps and corporate doesn't want it touched.  To further complicate it, it is not known when calling this service if the data will or won't be too large.  The only way we know that is when it crashes.  With seeing others having success by changing various IIS configurations, we were hoping there would be a solution like that for us.

    Friday, August 24, 2018 1:28 PM
  • IIS does have the ability to use Gzip to compress payload size.

    You should post to the IIS forums.

    Saturday, August 25, 2018 9:56 AM
  • Hi da.3vil.coder,

    According to your description, I think that configuration may not be applied correctly to the HTTPS endpoint.

    As far as I know, due to the WCF limitation of message size, we should configure the web.config to accept large message. You can also need to set readerQuotas.

            <binding maxReceivedMessageSize=" 2147483647" name=mybinding”>
              <readerQuotas .../>

    And then we should ensure that binding settings are applied correctly.

      <service name="sv">
        <endpoint address="https://localhost/YourService.svc"
          binding="basicHttpBinding" bindingConfiguration="mybinding"
          contract="isv" />

    Here is a post for discussion on related issues, wish it is useful to you.

    Feel free to let me know if you have any questions.

    Best Regards


    Monday, August 27, 2018 1:38 AM
  • Come to find out, everything in the config was correct and we've been running around in circles for nothing. Turned out to be an issue with how the network team has the load balancer configured.
    Monday, August 27, 2018 3:05 AM