Answered by:
Size error in WCF

Question
-
User2052414696 posted
Hi, I have a WCF service that return a larga datatable. When I call the service there are the following error:
It has exceeded the maximum size quota for incoming messages (65536) To increase the quota, use the property MaxReceivedMessageSize : How can I increase this parameter??
There is my web.config
<configuration> <system.web> <compilation debug="true" strict="false" explicit="true" targetFramework="4.0"/> <pages> <namespaces> <add namespace="System.Runtime.Serialization"/> <add namespace="System.ServiceModel"/> <add namespace="System.ServiceModel.Web"/> </namespaces> </pages> <httpRuntime maxRequestLength="2097151" useFullyQualifiedRedirectUrl="true" executionTimeout="14400" /> </system.web> <system.serviceModel> <services> <service name="GestionCotizador" behaviorConfiguration="MyServiceTypeBehaviors"> <endpoint address="" binding="wsHttpBinding" contract="iGestionCotizador" /> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> </service> </services> <serviceHostingEnvironment multipleSiteBindingsEnabled="true"/> <behaviors> <serviceBehaviors> <behavior name="MyServiceTypeBehaviors"> <serviceMetadata httpGetEnabled="true"/> <serviceDebug httpHelpPageEnabled="true" includeExceptionDetailInFaults="true"/> </behavior> </serviceBehaviors> </behaviors> <bindings> <wsHttpBinding> <binding name="wsHttpBinding" allowCookies="true" maxReceivedMessageSize="20000000" maxBufferPoolSize="20000000"> <readerQuotas maxDepth="32" maxArrayLength="200000000" maxStringContentLength="200000000"/> </binding> </wsHttpBinding> </bindings> </system.serviceModel> <system.webServer> <modules runAllManagedModulesForAllRequests="true"/> <!-- Para examinar el directorio raíz de la aplicación web durante la depuración, establezca el valor siguiente en true. Establézcalo en false antes de la implementación para evitar revelar información sobre la carpeta de aplicación web. --> <directoryBrowse enabled="true"/> </system.webServer> </configuration>
Monday, September 9, 2013 9:57 AM
Answers
-
User1401801381 posted
Hi
it seems that the MaxReceivedMessageSize property is already increased here
is it your client or server config file ? it has to be increased on both side
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, September 9, 2013 10:02 AM -
User2103319870 posted
Hi
Have checked your WCF Client web config also.This message may come from WCF Client side too.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, September 9, 2013 10:02 AM
All replies
-
User1401801381 posted
Hi
it seems that the MaxReceivedMessageSize property is already increased here
is it your client or server config file ? it has to be increased on both side
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, September 9, 2013 10:02 AM -
User2103319870 posted
Hi
Have checked your WCF Client web config also.This message may come from WCF Client side too.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, September 9, 2013 10:02 AM -
User2052414696 posted
Thnks, I do add the next code in the web.config on the client:
<binding name="WSHttpBinding_iGestionCotizador" maxReceivedMessageSize="20000000" />
Monday, September 9, 2013 12:28 PM