Http 413 Status Code

I have a page with a regular Ajax update panel. There is a submit button that sends the user selection to the server. If the user waits a minute or two, the response from the server will be HTTP 413 (the request object is too large) from the server. This only happens when I try to resend it after waiting a minute or two. If you plot a page and submit the form, the server can process it.

I changed uploadReadAheadSize (as mentioned by http://forums.asp.net/t/1574804.aspx ) and set it to 200,000,000 - the problem still persists

Http Request

POST https://server/somepage HTTP/1.1 Accept: */* Accept-Language: en-US,zh-Hans;q=0.9,zh-CN;q=0.8,zh-SG;q=0.7,zh-Hant;q=0.6,zh-HK;q=0.4,zh-MO;q=0.3,zh-TW;q=0.2,zh;q=0.1 Referer: https://server/somepage x-requested-with: XMLHttpRequest x-microsoftajax: Delta=true Content-Type: application/x-www-form-urlencoded; charset=utf-8 Cache-Control: no-cache Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.3; .NET4.0E) Host: some-server Content-Length: 86124 Connection: Keep-Alive Form-Data........... 

The request is performed over SSL.

I also tried changing the httpruntime configuration in the web configuration

 <httpRuntime executionTimeout="3600" maxRequestLength="1902400" /> 
+4
source share
1 answer

This solved the error. Correct me if I can correctly describe the problem. SSL has opened a secure tunnel (for some time), so when I ever tried sending data over this period, everything was fine. But as soon as the tunnel is closed, and the server preloads the request before reconciling the client. But the maximum length of the preload was small, and therefore it failed.

I tried to set the uploadReadAhead value to 120,000, which was larger than the request size of the object around 86,000. However, the request failed (wierd .. ????). It became beautiful when I set it to around 10 MB.

+4
source

Source: https://habr.com/ru/post/1411101/


All Articles