When using WCF services you may get the following error: "The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element." This error is given because of size limits set to responses in your application configuration. You need to increase the value of two limiting parameters: maxBufferSize and maxReceivedMessageSize. In my example these values are set to 5000000.<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding
name="MyServiceConsumerBinding"
closeTimeout="00:01:00"
openTimeout="00:01:00"
receiveTimeout="00:10:00"
sendTimeout="00:01:00"
allowCookies="false"
bypassProxyOnLocal="false"
hostNameComparisonMode="StrongWildcard"
maxBufferSize="5000000"
maxBufferPoolSize="524288"
maxReceivedMessageSize="5000000"
messageEncoding="Text"
textEncoding="utf-8"
transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas Read more: Gunnar Peipman's ASP.NET blog
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding
name="MyServiceConsumerBinding"
closeTimeout="00:01:00"
openTimeout="00:01:00"
receiveTimeout="00:10:00"
sendTimeout="00:01:00"
allowCookies="false"
bypassProxyOnLocal="false"
hostNameComparisonMode="StrongWildcard"
maxBufferSize="5000000"
maxBufferPoolSize="524288"
maxReceivedMessageSize="5000000"
messageEncoding="Text"
textEncoding="utf-8"
transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas Read more: Gunnar Peipman's ASP.NET blog
0 comments:
Post a Comment