G
Guest
I have export to xls functionality in asp.net web form, implemented like this:
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment;
filename=InvChangeHistory.xls");
Response.AddHeader("Content-Length", fileToSend.Length.ToString());
Response.ContentType = "application/octet-stream";
Response.WriteFile(fileToSend.FullName);
Response.End();
when trying to download the file, and choosing Open in the IE dialog IE
throws this error:
Cannot find the C:\Documents and Settings\XXX_XXXX\Local Settings\Temporary
Internet Files\Content.IE5\QGN5CF6S\XXXXXX[1].xls file.
when saving the file, the file gets created in the temp directory and is
saved.
I am a missing a setting in the header, or is it IIS setting. This used to
work on other test web servers.
Thanks.
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment;
filename=InvChangeHistory.xls");
Response.AddHeader("Content-Length", fileToSend.Length.ToString());
Response.ContentType = "application/octet-stream";
Response.WriteFile(fileToSend.FullName);
Response.End();
when trying to download the file, and choosing Open in the IE dialog IE
throws this error:
Cannot find the C:\Documents and Settings\XXX_XXXX\Local Settings\Temporary
Internet Files\Content.IE5\QGN5CF6S\XXXXXX[1].xls file.
when saving the file, the file gets created in the temp directory and is
saved.
I am a missing a setting in the header, or is it IIS setting. This used to
work on other test web servers.
Thanks.