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();
 
Ad

Advertisements


Similar threads

N
Replies
2
Views
1K
Andrew Morton
A
C
Replies
2
Views
713
Carlos Lozano
C
S
Replies
2
Views
492
Allen Chen [MSFT]
A
J
Replies
6
Views
1K
Alexey Smirnov
A
R
Replies
1
Views
667
Alexey Smirnov
A
M
Replies
0
Views
4K
Madison
M
S
Replies
3
Views
1K
Alexey Smirnov
A
C
  • Christian W. Larsen
  • ASP .Net
Replies
1
Views
824
Alvin Bruney [ASP.NET MVP]
A
Top