I need to change the maxStringContentLength to a value larger than 8192 but have not been successful in doing it. My WCF service will generate an exception if the amount of data it receives is greater than 8192 bytes. I have exhausted my searches and nothing seems to help. I should point out that the exception comes from the server. Forget about the client because I am seeing the exception generated straight from WCF on the server. Here is my web.config settings:
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="DevServiceBehavior" >
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service name="DeveloperService"
behaviorConfiguration="DevServiceBehavior" >
<endpoint address="mtom"
binding="basicHttpBinding"
bindingConfiguration="Binding_DevService"
contract="DeveloperService">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint contract="IMetadataExchange"
binding="mexHttpBinding"
address="mex" />
</service>
</services>
<bindings>
<basicHttpBinding>
<binding name="Binding_DevService"
messageEncoding="Mtom"
openTimeout="00:02:00"
sendTimeout="00:02:00"
maxBufferPoolSize ="41943040"
maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="500"
maxArrayLength="20000000"
maxStringContentLength="20000000" />
</binding>
</basicHttpBinding>
</bindings>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"
multipleSiteBindingsEnabled="true"/>
</system.serviceModel>