I've created a service to receive large files. After that I've published it on my local IIS7. After that I've created test client with service reference. When I trying to send large file to server I've got: Bad request (400).
Service tracing of that exception: 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.
Server config:
<system.web>
<compilation debug="true" targetFramework="4.0" />
<httpRuntime maxRequestLength="2097151" useFullyQualifiedRedirectUrl="true" executionTimeout="14400"/>
<customErrors mode="Off" /></system.web>
Binding
<wsHttpBinding>
<binding name="wsBufferedHttpsBinding" messageEncoding="Mtom"
maxReceivedMessageSize="11534336" maxBufferPoolSize="524288"
sendTimeout="00:05:00" receiveTimeout="00:05:00" openTimeout="00:05:00" closeTimeout="00:05:00" >
<readerQuotas maxDepth="64" maxStringContentLength="11534336" maxArrayLength="11534336"
maxBytesPerRead="11534336" maxNameTableCharCount="16384" />
</binding>
</wsHttpBinding>
Service
<service name="MyService">
<endpoint address=""
binding="wsHttpBinding"
bindingName="wsBufferedHttpsBinding"
contract="IServiceContract">
</endpoint>
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
<endpoint address="soap12IssuedToken" binding="customBinding"
bindingConfiguration="soap12IssuedToken" name="soap12IssuedToken"
bindingNamespace="http://url"
contract="IServiceContract" />
</service>
What the hell wrong with this service? I set this message size everywhere.