2

My colleagues and I have been bashing our heads against a brick wall trying to resolve an issue of sending more than 8192 bytes of data to a web Service. I've tried creating a simple WCF project to test sending some data and yet it still fails at 8192+ bytes. I've read hundreds of web pages and made changes to the web.config file to ensure the elements are sufficiently large enough but it still doesn’t work.

Any suggestions would be appreciated.

We are testing the service using IIS Express on the local host as the web server and using WCFTestClient to send data to the Service. We have also tried using Storm as the client for sending data to the web service.

<?xml version="1.0"?>
<configuration>

  <system.web>
    <compilation debug="true" targetFramework="4.0" />
  </system.web>
  <system.serviceModel>
    <client>
      <endpoint binding="basicHttpBinding" bindingConfiguration="NewBinding0"
        contract="IService1" name="ClientEndPointName" />
    </client>
    <services>
      <service name="Service1">
        <endpoint address="http://localhost:2787" binding="basicHttpBinding"
          bindingConfiguration="NewBinding0" name="DROServiceX" bindingName="DROBindingName"
          contract="IService1" isSystemEndpoint="false" />
      </service>
    </services>
    <bindings>
      <basicHttpBinding>
        <binding name="NewBinding0" transferMode="Buffered">
          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
        maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
        </binding>
      </basicHttpBinding>
    </bindings>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="true"/>
         <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="false"
  multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
 <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>

</configuration>

1 Answers1

0

You should configure this on server AND client side. If one of the is not correctly configured, the requests will fail. Your server is configured correctly, so you should have a look at the client configuration. If you realy what to know what is going on, start WCF tracing to see what happens.

WCF Tracing MSDN

Peter
  • 27,590
  • 8
  • 64
  • 84