SaveAs excel Dialog and IIS ConnectionTimeOut

Discussion in 'ASP .Net Security' started by N. Shehzad, Apr 20, 2010.

  1. N. Shehzad

    N. Shehzad Guest

    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();
     
    N. Shehzad, Apr 20, 2010
    #1
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark Ritchey
    Replies:
    0
    Views:
    8,555
    Mark Ritchey
    Dec 10, 2003
  2. Jeffrey A. Voigt

    Possible to do a File SaveAs Dialog In ASP.NET

    Jeffrey A. Voigt, Jun 16, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    5,939
    Jeffrey A. Voigt
    Jun 17, 2004
  3. Chris
    Replies:
    3
    Views:
    447
  4. N. Shehzad
    Replies:
    2
    Views:
    1,076
    Andrew Morton
    Apr 22, 2010
  5. Dan Sikorsky

    HOWTO: Force the SaveAs Dialog Box For Downloads

    Dan Sikorsky, Apr 20, 2004, in forum: ASP General
    Replies:
    3
    Views:
    489
    Dan Sikorsky
    Apr 21, 2004
  6. Tim Meagher
    Replies:
    1
    Views:
    544
    Bob Barrows [MVP]
    Oct 4, 2005
  7. Replies:
    5
    Views:
    405
  8. Martin Mrazek
    Replies:
    0
    Views:
    312
    Martin Mrazek
    May 18, 2004
Loading...