Rajakrishnan
Rajakrishnan

Reputation: 161

download issue in IE 10

I have designed a web site, where we will be able to download zip file. I have a problem in while downloading the file in IE10. The download fails if the the zip file size is big. This works fine with the same code in IE 8.

After a lot of research, I found that Response.Close is the issue. Instead of Response.Close, if I use HttpContext.Current.ApplicationInstance.CompleteRequest() then the file is downloaded correct. Is this approach correct?

What is the difference between HttpContext.Current.ApplicationInstance.CompleteRequest() vs Response.End()

Upvotes: 1

Views: 98

Answers (1)

Rachel Gallen
Rachel Gallen

Reputation: 28563

According to the MSDN website these are the remarks on response.close

http://msdn.microsoft.com/en-us/library/system.web.httpresponse.close.aspx

"This method terminates the connection to the client in an abrupt manner and is not intended for normal HTTP request processing. The method sends a reset packet to the client, which can cause response data that is buffered on the server, the client, or somewhere in between to be dropped. However, typically you should call CompleteRequest instead if you want to jump ahead to the EndRequest event and send a response to the client."

Upvotes: 1

Related Questions