I have a webservice which waits for a xml to arrive. Today we noticed, that the XML sometimes seems to be too large. Now I wanted to add <httpRuntime maxRequestLength="10096" to my app.config. Unfortunately it seems to have no effect… Here is my app.config:
useFullyQualifiedRedirectUrl="true"
executionTimeout="120"/>
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<httpRuntime maxRequestLength="10096"
useFullyQualifiedRedirectUrl="true"
executionTimeout="120"/>
</system.web>
<system.serviceModel>
<client />
<standardEndpoints />
<services>
<service behaviorConfiguration="metadataSupport" name="iib.wohnpreis.wohnpreisserver">
<host>
<baseAddresses>
<add baseAddress="URLToWebservice" />
</baseAddresses>
</host>
</service>
</services>
<bindings>
<basicHttpBinding>
<binding name="basicHttpBinding" transferMode="Buffered" useDefaultWebProxy="false">
<readerQuotas maxStringContentLength="2147483647" />
</binding>
</basicHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="metadataSupport">
<serviceMetadata httpGetEnabled="true" httpGetUrl="wohnpreis/mex" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
Any suggestions what went wrong?
Thank you for trying to help me!
Steffi
Got the problem. The server told the client that the maxStringContentLength was limited to 8096 – which is not true because we defined it with
Unfortunately this only works if we delete the
name="basicHttpBinding"so it looks likeDon’t know how the name is interfering with the configuration – but without the name it works fine…