简体   繁体   中英

Intermittent 413: Request Entity Too Large error with ASMX web service over https

I have an ASMX web service which accepts a few parameters, one of which is a serialized jpg. These files are generally ~100KB in size.

I am able to call my service and send the files successfully for a while, then it starts returning 413 errors. I've sniffed the wire for the requests, and the request sizes are virtually identical (and in fact, the failing call is smaller by 500 bytes than the successful call).

If I then send a much smaller file (say 50KB) it starts working again, and I can then send larger files for a while.

I have this in my web.config file:

<security>
  <requestFiltering>
    <requestLimits maxAllowedContentLength="2147483647" />
  </requestFiltering>
</security>

This is over https on IIS 7.5 in Windows Server 2008 R2 SP1. Any help would be appreciated. Thanks!

--UPDATE-- This appears to be the solution: I'm pasting it below in the hopes that someone else will find it useful.

C:\Windows\System32\inetsrv>appcmd.exe set config -section:system.webServer/serverRuntime /uploadReadAheadSize:"1048576"  /commit:apphost

Interesting problem, I haven't had this issue but snooped around alot, seems like most people find some relief by adjusting theUploadReadAheadSize , here's a thread on iis.net where they were able to clear it up on IIS7.5 by setting that value in applicationHost.config, good luck...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM