Large WCF web service request failing with (400) HTTP Bad Request

后端 未结 9 1648
隐瞒了意图╮
隐瞒了意图╮ 2020-11-28 03:30

I\'ve encountered this apparently common problem and have been unable to resolve it.

If I call my WCF web service with a relatively small number of items in

9条回答
  •  误落风尘
    2020-11-28 04:12

    In the server in .NET 4.0 in web.config you also need to change in the default binding. Set the follwowing 3 parms:

     < basicHttpBinding>  
       < !--http://www.intertech.com/Blog/post/NET-40-WCF-Default-Bindings.aspx  
        - Enable transfer of large strings with maxBufferSize, maxReceivedMessageSize and maxStringContentLength
        -->  
       < binding **maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"**>  
          < readerQuotas **maxStringContentLength="2147483647"**/>            
       < /binding>
    

提交回复
热议问题