开发者

WCF Error:101 Page is not available

开发者 https://www.devze.com 2023-02-20 08:39 出处:网络
I have this problem on WCF Rest service. When the data gets bigger like more than 1.2MB it开发者_运维知识库 will give me a \"Error:101 This webpage is not available\" in chrome. In firefox its \"The c

I have this problem on WCF Rest service. When the data gets bigger like more than 1.2MB it开发者_运维知识库 will give me a "Error:101 This webpage is not available" in chrome. In firefox its "The connection was reset". However, it will work on small data. The data is just a plain JSON by the way.

Below is my configuration:

WebConfig(Binding Configuration):

<basicHttpBinding>
    <binding name="basicHttpBindingConfig" 
        closeTimeout="00:30:00" 
        openTimeout="00:30:00" 
        receiveTimeout="Infinite" 
        sendTimeout="00:30:00" 
        maxBufferPoolSize="2147483647" 
        maxReceivedMessageSize="2147483647" 
        maxBufferSize="2147483647">
                <readerQuotas 
        maxDepth="2147483647" 
        maxStringContentLength="2147483647" 
        maxArrayLength="2147483646" 
        maxBytesPerRead="2147483647" 
        maxNameTableCharCount="2147483647" />
    </binding>
</basicHttpBinding>

  <webHttpBinding>
    <binding name="webclientHttpBindingConfig" 
        closeTimeout="00:30:00" 
        openTimeout="00:30:00" 
        receiveTimeout="Infinite" 
        sendTimeout="00:30:00" 
        maxBufferPoolSize="2147483647" 
        maxReceivedMessageSize="2147483647" 
        maxBufferSize="2147483647">
      <readerQuotas 
        maxDepth="2147483647" 
        maxStringContentLength="2147483647" 
        maxArrayLength="2147483646" 
        maxBytesPerRead="2147483647" 
        maxNameTableCharCount="2147483647" />
    </binding>
  </webHttpBinding>

AppConfig(Binding Configuration):

   <basicHttpBinding>
    <binding name="basicBindingForBigArrays" 
        maxBufferSize="2147483647"
        maxBufferPoolSize="2147483647" 
        maxReceivedMessageSize="2147483647"
        messageEncoding="Mtom">
      <readerQuotas 
        maxDepth="2147483647" 
        maxStringContentLength="2147483647"
        maxArrayLength="2147483647" 
        maxBytesPerRead="2147483647" 
        maxNameTableCharCount="2147483647" />
    </binding>
  </basicHttpBinding>

  <webHttpBinding>
    <binding name="webHttpBindingConfig"
        maxBufferSize="2147483647"
        maxBufferPoolSize="2147483647" 
        maxReceivedMessageSize="2147483647" >
      <readerQuotas 
        maxDepth="2147483647" 
        maxStringContentLength="2147483647" 
        maxArrayLength="2147483646" 
        maxBytesPerRead="2147483647" 
        maxNameTableCharCount="2147483647"/>
    </binding>
  </webHttpBinding>

I've been struggling on this for hours now. Your thoughts is greatly appreciated.

Best regards,


If you are running IIS, you need to make sure that max HTTP post size is set:

<httpRuntime maxRequestLength="8192" />

8MG is the default but your case could be set at 1MB. For info look here.

0

精彩评论

暂无评论...
验证码 换一张
取 消