We found an issue where Firefox wasn't getting the entire file bytes sent by our ASP Server (in our case, the last byte of the stream was not read so the file were corrupt) but this bug never happens in Internet Explorer.
Here is the problematic code :
1: Response.Clear();
2: Response.ContentType = file.Mime;
3: Response.Cache.SetCacheability(HttpCacheability.Private);
4: Response.Expires = -1;
5: Response.Buffer = false;
6: Response.AddHeader("Content-Disposition", String.Format("{0};FileName=\"{1}\"", "attachment", file.Name));
7: Response.OutputStream.Write(file.Contents, 0, file.Contents.Length);
8: Response.End();
We found 2 solutions :
First, just change the Response.Buffer = False to Response.Buffer = true, this will have for effect that the response will not be sent until all the scripts are processed or the call of Response.End(), Response.Flush() call.
1: Response.Clear();
2: Response.ContentType = file.Mime;
3: Response.Cache.SetCacheability(HttpCacheability.Private);
4: Response.Expires = -1;
5: Response.Buffer = true;
6: Response.AddHeader("Content-Disposition", String.Format("{0};FileName=\"{1}\"", "attachment", file.Name));
7: Response.OutputStream.Write(file.Contents, 0, file.Contents.Length);
8: Response.End();
Or do not set the Response.Buffer, and use Response.BinaryWrite() (http://msdn.microsoft.com/en-us/library/ms524318.aspx) instead of Response.OutputStream() :
1: Response.Clear();
2: Response.ContentType = file.Mime;
3: Response.Cache.SetCacheability(HttpCacheability.Private);
4: Response.Expires = -1;
5: Response.AddHeader("Content-Disposition", String.Format("{0};FileName=\"{1}\"", "attachment", file.Name));
6: Response.BinaryWrite(file.Contents);
7: Response.End();
Views(1550)

