service configuration in visual studio doesnt work

50 views Asked by At

I'm implementing a WCF service that is supposed to offer a dataset that's bigger than the default configuration allows it to be and I get the 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.

I already searched a lot, and tried a lot with the binding configuration in web.config file but nothing seems to work.

I hope one of you can pinpoint my mistake, I guess its a pretty easy one.

Here is my web.config:

<system.serviceModel>
   <services>
      <service name="PgSynthDBService.SynthDBService">
         <endpoint 
             address="" 
             binding="wsHttpBinding" bindingConfiguration="MyBinding" 
             contract="PgSynthDBService.ISynthDBService" />
      </service>
   </services>
   <bindings>
      <wsHttpBinding>
         <binding name="MyBinding" 
                  maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
             <readerQuotas maxDepth="32" maxStringContentLength="2147483647"   
                           maxArrayLength="16348" maxBytesPerRead="4096" 
                           maxNameTableCharCount="16384" />          
         </binding>
      </wsHttpBinding>
   </bindings>
   <behaviors>
       <serviceBehaviors>
          <behavior>
             <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
             <serviceDebug includeExceptionDetailInFaults="false"/>
          </behavior>
       </serviceBehaviors>
   </behaviors>
   <protocolMapping>
      <add binding="basicHttpBinding" scheme="http" />
   </protocolMapping>
   <serviceHostingEnvironment aspNetCompatibilityEnabled="true" 
                              multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
   <modules runAllManagedModulesForAllRequests="true"/>
   <directoryBrowse enabled="true"/>
</system.webServer>

Thanks in advance

0

There are 0 answers