Error downloading files writing to Response.Output

G

Guest

Hello All.

I have seen many posts slightly similar to this question with no answer.
Maybe you have some FAQs or something, sorry if I looks repetitive.


Here is my Problem:

In my application I have a link button inside a module on an IBuySpy Portal
to download an excel file. I generate the excel file using the Office 2003
XML file format. There is to say that my excel file is an XML document. The
link button code looks like this:

Page.Response.Clear();
Page.Response.ClearContent();
Page.Response.ContentType = "application/vnd.ms-excel";
Page.Response.AppendHeader("Content-Disposition",
"attachment;filename=ExcelFile.xls");
Page.Response.ContentEncoding = System.Text.Encoding.UTF8;
Page.Response.Output.Write(excelXML);
Page.Response.End();

I installed the module in an IBuySpy Portal and this was working fine: IE
opens a download file dialog prompting to open or save it and both options
was working well.

Suddenly, it stops work; if I click on “Open†I got some error: “C:\Document
and Settings\...\LocalSettings\Temporary Internet Files\Cont…..\
ExcelFile.xls†could not be found. Check the spelling of the file name, and
verify that the file name is correct.†If I click on save and then open it by
hand it works.

This also happens on other XML files (not excel files, just personal XML
files).

Any idea on this? this is killing me :(

Thank you.
 

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
473,997
Messages
2,570,240
Members
46,830
Latest member
HeleneMull

Latest Threads

Top