Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thank you for additional information. I logged this request in our defect database as issue #7166. I will notify you as soon as it is fixed.
As a workaround, you can use the following code:
MemoryStream stream = new MemoryStream();
byte bytes = stream.GetBuffer();
//Specify the document type.
Response.ContentType = "application/pdf";
// Response.ContentType = "application/msword"
//Response.ContentType = "text/plain"
//Response.ContentType = "text/html"
//Specify how the document is sent to the browser.
Response.AddHeader("content-disposition", "attachment; filename=test.doc");
//Another option could be:
//Response.AddHeader "content-disposition","inline; filename=MyDocument.doc";
//Get data bytes from the stream and send it to the response.