I have a public facing web server with IIS hosting WCF 3.5. When the request is received, the host turns around and calls another WCF 3.5 service inside the firewall, hosted in a .NET Windows Service.
I started having this problem when a client sends more than 200 objects in the List<t> into one of my methods. I read numerous posts about how to resolve this, but my attempts haven't worked. I get this 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.".
Here is the config in my Web.config for the IIS hosted WCF:
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="OrderBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFa
ults="true
" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<binding name="Binding" maxBufferSize="2147483647"
maxBufferPoolSize="2147483
647" maxReceivedMessageSize="21
47483647" >
<readerQuotas maxDepth="32" maxStringContentLength="81
92" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="163
84" />
</binding>
</basicHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="Ord
erBehavior
" name="MonaVie.IBS.Service.
IBSService
IIS">
<endpoint address="
http://nathanj-desktop/IBSService/IBSService.svc"
binding="basicHttpBinding"
bindingConfiguration="Bind
ing"
name="IBSServiceEndpoint" contract="MV.IBS.Service.I
IBS" />
</service>
</services>
</system.serviceModel>
...and here is the section from my app.config in the .NET Windows Service hosted WCF:
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="SecureOrderBehavior"
>
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFa
ults="true
" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<binding name="Binding" maxBufferSize="2147483647"
maxBufferPoolSize="2147483
647" maxReceivedMessageSize="21
47483647">
<readerQuotas maxDepth="32" maxStringContentLength="81
92" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="163
84" />
<security mode="None">
</security>
</binding>
</basicHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="Sec
ureOrderBe
havior" name="MV.IBS.Service.IBSSe
rvice">
<endpoint
address="
http://nathanj-desktop:8001/IBSService"
binding="basicHttpBinding"
bindingConfiguration="Bind
ing"
name="IBSServiceEndpoint"
contract="MV.IBS.Service.I
IBS" />
<host>
<baseAddresses>
<add baseAddress="
http://nathanj-desktop:8001/IBSService" />
</baseAddresses>
</host>
</service>
</services>
</system.serviceModel>
The IIS (1st) address is
http://nathanj-desktop/IBSService/IBSService.svc.
The Windows Service (2nd) address (receives request from WCF in IIS) is
http://nathanj-desktop:8001/IBSService.
I did google searches on this error message and read dozens of articles and tried various things.
IMPORTANT: It seems the problem is between the IIS WCF and the Windows Service WCF, not between the client and IIS. When I set a breakpoint in my .net code hosted in IIS, I get to the breakpoint and the hundreds of List<object>'s are there -- they came in. But when the code calls into the winservice-hosted code, that's when I get the error. But you can see that I have very similar config in the winservice app.config.
Please help.