Forum Discussion

Rahul0513's avatar
Rahul0513
Frequent Visitor
8 years ago

HTTP/1.1 413 Request Entity Too Large

i am testing a .NET WCF service via SOAPUI which results into the following error only for large request size.

HTTP/1.1 413 Request Entity Too Large
Server: Microsoft-IIS/8.0
X-SourceFiles: =?UTF-8?B?QzpcVXNlcnNcUkJob3NhXFNvdXJjZVxXb3Jrc3BhY2VzXERTU19BUElcRGV2XFByb2plY3RzXENIRzAwMzk2NThcUW9pQXBpXEhvc3RzXFJldGFpbFNhbGVzTGlzdFNlcnZpY2Uuc3Zj?=
X-Powered-By: ASP.NET
Date: Mon, 16 Jan 2017 07:26:20 GMT
Content-Length: 0

 

This is the sample web.config i am using for the same.

 

<system.serviceModel>
   
    <bindings>
      <basicHttpBinding>      
      <binding name="BasicHttpEndpointBinding"
               maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"
               openTimeout="00:10:00" closeTimeout="00:10:00" sendTimeout="00:10:00" receiveTimeout="00:10:00"
               messageEncoding="Text" textEncoding="utf-8" bypassProxyOnLocal="true">
        <readerQuotas maxDepth="32"
                      maxStringContentLength="2147483647" maxArrayLength="2147483647"
                      maxBytesPerRead="4096" maxNameTableCharCount="32765" />
        <security mode="None" />
      </binding>
      </basicHttpBinding>
    </bindings>
    <behaviors>
      <serviceBehaviors>
        <behavior name="serviceBehavior">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="true" />
          <dataContractSerializer maxItemsInObjectGraph="2147483647" />
          <useRequestHeadersForMetadataAddress />
        </behavior>
        <behavior name="">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="true" />
          <dataContractSerializer maxItemsInObjectGraph="2147483647" />
        </behavior>

      </serviceBehaviors>
    </behaviors>
    <services>
      <service behaviorConfiguration="serviceBehavior" name="Hosts.Dummyname">
        <endpoint address="soap" binding="basicHttpBinding" bindingConfiguration="BasicHttpEndpointBinding" name="basicHttp" contract="IDummy" />
        
        <host>
          <baseAddresses>
            <add baseAddress="localhost" />
          </baseAddresses>
        </host>
      </service>
    </services>

    <serviceHostingEnvironment minFreeMemoryPercentageToActivateService="0"  />
  </system.serviceModel>

 

Can anyone please suggest ?