I am getting 413 incorrect status error in wcf RRS feed

  • Question

  • I am getting 413 incorrect status error in wcf. It works fine for smaller files but it fails for larger files. Below is the  part webcofig file. Can someone help me where i need to increase the message size?

              <!-- To avoid disclosing metadata information, set the values below to false before deployment -->
              <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
              <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
              <serviceDebug includeExceptionDetailInFaults="false" />
          <add binding="basicHttpsBinding" scheme="https"  />
        <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />

    Thursday, September 13, 2018 3:06 AM

All replies

  • Hi Angelaeva,

    As you know, WCf throw Http 413 error, along with “Request entity too large”. We usually need to configure the transmitted message size on the client-side and on the serve-side. And configure httpruntime section in web.config.

    <binding name="mybinding" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" transferMode="Streamed" sendTimeout="00:10:00" receiveTimeout="00:10:00">

              <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" />

    <httpruntime> section.

    <configuration> <system.web> <httpRuntime maxRequestLength="2147483647" executionTimeout="3600" /> </system.web> </configuration>

    Don’t forget to apply the configuration between the client-side and server-side (you should also add this configuration on both the client-side and server-side endpoints).

    <endpoint binding="basicHttpBinding" bindingConfiguration="mybinding" contract="BestService.IService" />

    Feel free to let me know if the problem still exists.

    Best Regards


    Saturday, September 15, 2018 3:54 PM