SaveAs excel Dialog and IIS ConnectionTimeOut

N

N. Shehzad

Experts:
I have a following code that allows a user to download excel file. However
if the download dialog has been sitting there for more than two minutes which
is connectiontimeout setting on IIS, user cannot download the file, and it
results in error. How can I keep the connection open, so that if users goes
for restroom break, and meanwhile the popup saveAs dialog has shown up
without changing the connectionTimeOut property on the IIS server?

//request was not aborted
Response.Clear();
Response.ClearContent();
Response.ClearHeaders();
Response.ContentType = "application/vnd.ms-excel";
Response.AddHeader("Content-Disposition", "attachment;
filename=" + _fileDisplayName);
Response.Charset = "";
if (System.IO.File.Exists(Server.MapPath(".") + "\\" +
_xlFileName))
Response.TransmitFile(Server.MapPath(".") + "\\" +
_xlFileName);
Response.Flush();
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top