ASP.NET POST-DATA truncated to 49152 bytes (48K)

I get errors when the viewstate cannot be decoded, and some of the errors are due to the fact that the HTTP message data was truncated to exactly 48K (49152) bytes.

This is listed as one of the fixes in .NET 2.0 SP1. I currently have .NET 3.5 SP1.

This problem does not seem to occur with every message. Any ideas?

KB 945757 Issues Fixed in .NET Framework 2.0 Service Pack 1

KB 925248 FIX : data in a POST request is truncated to 49.152 bytes when an ASP.NET-connected application receives a POST request

EDIT: Caught one of these errors in my error logs after adding a name to the encoding. It shows that the content type was correctly set to url-encoded, and the content length was above 49152. But the post data dump in the error log was again exactly 49152 bytes again. I was able to recreate it by clicking the submit button several times from the page. I think the user did this because for some reason the page is processing very slowly (it used to be much faster). This is probably the follow-up material that encountered this truncation. My fix may be to make the page quick and / or disable the button with the first click.

+4
source share
2 answers

I know this problem was IIS5 , it would truncate all data above 48 Kbytes, unless the form was submitted as application/x-www-form-urlencoded , try setting this as your content-type as:

 <form accept-charset="utf-8" enctype="application/x-www-form-urlencoded" ... > </form> 

pen-tester can cause this problem.

If you are also looking for HTTP smuggling , you will find the same problem.

you can read more about HTTP smuggling information.

+1
source

I came across this once, and it turned out that it cuts off the browser!

I don’t remember which one is bigger. I want to say that it was firefox, but I can not be sure.

the fix was to change the type of the form content to multipart/form-data .

+1
source

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


All Articles