vnd.ms-excel Session State Expires

Discussion in 'ASP .Net' started by Jay Balapa, Dec 11, 2006.

  1. Jay Balapa

    Jay Balapa Guest

    Hello,

    Iam dynamically trying to send my html table report to a excel spread
    sheet, by setting following headers. Basically user picks a report name from
    a aspx page and report type ("EXCEL"). I clear aspx page of all controls and
    use Response.Write to author a HTML page.

    Response.ContentType = "application/vnd.ms-excel";

    Response.ContentEncoding = System.Text.Encoding.UTF8;

    Response.AddHeader("Content-Disposition","filename="+heading+".xls");

    After the first report has been generated and if we use the back button to
    create another report. ASP.NET redirects the user to the login.aspx page
    which is the default redirect page when session expires. ie. Login.aspx
    opens in excel.

    It looks like the session state expires, we are using instate session,
    cookieless session state. The correct reponse would be basically the second
    should just open in excel overwriting the oldone instead of redirecting.
    This was the default behavior until few months we dont know what happened.

    Any Help will be appreciated.

    Thanks.

    jay
     
    Jay Balapa, Dec 11, 2006
    #1
    1. Advertising

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. CVerma
    Replies:
    2
    Views:
    10,337
    C Verma
    Sep 28, 2004
  2. Replies:
    2
    Views:
    6,170
  3. emrefan
    Replies:
    9
    Views:
    1,895
    emrefan
    Dec 7, 2007
  4. Trapulo
    Replies:
    8
    Views:
    12,339
    M Minaga
    Sep 15, 2010
  5. Jerry O
    Replies:
    1
    Views:
    491
    Manohar Kamath [MVP]
    Sep 4, 2003
Loading...

Share This Page