FIX: You receive an exception error message when you specify a Content-Length HTTP header that is larger than 2 GB in ASP.NET 2.0
Symptoms
In Microsoft ASP.NET 2.0, when you try to use the TransmitFile function to specify a Content-Length HTTP header that is larger than 2 gigabytes (GB), you receive the following exception error message:
Value was either too large or too small for an Int32. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.OverflowException: Value was either too large or too small for an Int32. Additionally, you may experience a problem with application pool restarts under a heavy load. This problem can cause a decrease in performance on a server that is running Microsoft Internet Information Services (IIS) and an ASP.NET Web application.
Resolution
This problem occurs when ASP.NET 2.0 tries to parse the value of the Content-Length HTTP header as an Int32 data type. Therefore, if the value of the header is more than the maximum value of an Int32 data type, an overflow exception occurs. The maximum value of an Int32 data type is 2,147,483,647.
