Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WCF no endpoint listening for larger files

Tags:

wcf

iis-7.5

I have a WCF 4.0 service deployed on a 2K8R2 dev server and hosted under IIS 7.5. I'm calling it locally from a test app (WPF). I'm running into a problem sending largish files (via a byte array) where I get the following error when attempting to send a 23MB (or larger) file.

There was no endpoint listening at http:///FileStorageClone/FileStorage.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

Up to a 19MB works fine. I've upped the timeout settings and set max buffer, received message and array sizes all at 2GB in the web.config file. The exception is thrown almost immediately (not long enough to have timed out).

It's running using basicHttpBinding, though as that's solidified next steps will be other binding types.

I first worked out the connections with small files, then moved to larger. At 64KB I ran into max buffer and received message sizes. At 4MB I learned I needed to bump up the httpRuntime under system.Web from the default 4GB value.

It feels like an IIS or site-level issue to me. Any idea where I may be missing?

like image 611
John Spiegel Avatar asked Aug 06 '12 19:08

John Spiegel


1 Answers

It looks like this is a setting more at the IIS level. Setting requestFiltering in the web.config or via appcmd.exe are two viable options. In the web.config, the following example sets the limit to 2.2 billion bytes:

  <system.webServer>
    <security>
      <requestFiltering> 
        <requestLimits maxAllowedContentLength="2200000000" /> 
      </requestFiltering> 
    </security>
  </system.webServer>

Thanks to: http://www.dantor.com/support/misc/web-config-requestFiltering-user-agent.aspx

Also, via appcmd.exe, see: http://forums.iis.net/t/1066272.aspx

like image 85
John Spiegel Avatar answered Sep 30 '22 00:09

John Spiegel