Answered by:
WCF and MaxReceivedMessageSize

Question
-
User116907704 posted
Hi.
Im receiving an error when I try to consume my WCF
The maximum message size quota for incoming messages (65536) has been exceeded.
Here is my WCF config file:
<?xml version="1.0"?> <configuration> <appSettings> <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true"/> </appSettings> <system.web> <compilation debug="true"/> <customErrors mode="Off"/> </system.web> <!-- When deploying the service library project, the content of the config file must be added to the host's app.config file. System.Configuration does not support config files for libraries. --> <system.serviceModel> <bindings> <basicHttpBinding> <binding name="myBasicBinding" maxBufferPoolSize="20000000" maxBufferSize="20000000" maxReceivedMessageSize="20000000"> <readerQuotas maxDepth="32" maxStringContentLength="200000000" maxArrayLength="200000000" /> </binding> </basicHttpBinding> </bindings> <serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> <services> <service name="GP3ServiceLibrary.GP3Service"> <endpoint name="basicEndpoint" binding="basicHttpBinding" bindingConfiguration="myBasicBinding" contract="GP3ServiceLibrary.IGP3" /> <host> <baseAddresses> <add baseAddress="http://localhost:8733/Design_Time_Addresses/GP3ServiceLibrary/Service1/" /> </baseAddresses> </host> </service> </services> <behaviors> <serviceBehaviors> <behavior> <!-- To avoid disclosing metadata information, set the values below to false before deployment --> <serviceMetadata httpGetEnabled="True" httpsGetEnabled="False"/> <!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information --> <serviceDebug includeExceptionDetailInFaults="False"/> </behavior> </serviceBehaviors> </behaviors> </system.serviceModel> <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
Can anybody help me?
Tks
Friday, August 23, 2013 7:23 PM
Answers
-
User2103319870 posted
Hi,
Have you tried to increase the maxReceivedMessageSize,maxBufferSize and maxBufferPoolSize of your Client config. The message may be coming from wcf client too.You should look in your client config and match the maxReceivedMessageSize to the servers message size.
Refer this link for more details
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, August 23, 2013 7:44 PM
All replies
-
User2103319870 posted
Hi,
Have you tried to increase the maxReceivedMessageSize,maxBufferSize and maxBufferPoolSize of your Client config. The message may be coming from wcf client too.You should look in your client config and match the maxReceivedMessageSize to the servers message size.
Refer this link for more details
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, August 23, 2013 7:44 PM -
User116907704 posted
That is it. Why the client config dont configure yourself automaticaly when I add a service reference? TksSaturday, August 24, 2013 9:37 AM