vnd.ms-excel Session State Expires

J

Jay Balapa

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
 

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
474,053
Messages
2,570,431
Members
47,075
Latest member
TysonV438

Latest Threads

Top