开发者

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 the UploadReadAheadSize , 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...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜