码迷,mamicode.com
首页 > Web开发 > 详细

http 413 wcf

时间:2016-08-31 22:24:00      阅读:192      评论:0      收藏:0      [点我收藏+]

标签:

在网上搜到413的解决办法有多种,看具体项目找到对应的解决办法

如果是wcf返回的413,与serverRuntime无关,只要在Binding中设置最大接收值即可,

   <binding name="basic-http-bind-cfg" messageEncoding="Text"   maxBufferPoolSize="2147483647" 
      maxReceivedMessageSize="2147483647" 
      maxBufferSize="2147483647" >
          <security mode="TransportCredentialOnly">
            <transport clientCredentialType="Windows"/>
          </security>
         
        </binding>

如果还不行,这样设置就可以了,我就是这样解决的

   <basicHttpBinding>

        <binding   maxBufferPoolSize="2147483647" 
      maxReceivedMessageSize="2147483647" 
      maxBufferSize="2147483647">
          <security mode="TransportCredentialOnly">
            <transport clientCredentialType="Windows" />
          </security>
        </binding>

        <binding name="basic-http-bind-cfg" messageEncoding="Text"   maxBufferPoolSize="2147483647" 
      maxReceivedMessageSize="2147483647" 
      maxBufferSize="2147483647" >
          <security mode="TransportCredentialOnly">
            <transport clientCredentialType="Windows"/>
          </security>
        
        </binding>

第一个无name的binding很重要

http 413 wcf

标签:

原文地址:http://www.cnblogs.com/langu/p/5827496.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!