ASP.NET/IIS6 - Disable encoding using dynamically compressed content?

I am running ASP.NET on an IIS6 server. The server is now configured to compress dynamically generated content, mainly to reduce page size for ASPX files that are extracted.

After the .aspx files have the following bit of code used to extract the file from the database and send it to the user:

Response.Clear();
Response.Buffer = true;
Response.ContentType = Document.MimeType;
Response.AddHeader("content-disposition", "attachment;filename=\"" + Document.Filename + Document.Extension + "\"");
Response.AddHeader("content-length", Document.FileSizeBytes.ToString());

byte[] docBinary = Document.GetBinary();
Response.BinaryWrite(docBinary);

The download itself works fine. However, the person downloading the file does not receive a progress bar, which is incredibly annoying.

From the research that I did, it seems that when IIS sets up the transfer encoding, which is performed when compressing dynamic content, which removes the content length header, as this violates the HTTP1.1 standard in doing so.

? ASP.NET ? -?

+5
1

/ , . .:

HTTP (IIS 6.0)

: " HTTP "

( , ).

, , .

, , , .

+2

All Articles