Hi there
I want to stream my word document on the http response outputstream, but I get an exception:
NotSupportedException: Specified method is not supported.]
System.Web.HttpResponseStream.set_Position(Int64 value) +28
?.?.?(Stream ?) +300
?.?.?(Document ?, Stream ?, String ?) +50
Aspose.Words.Document.Save(Stream stream, SaveFormat fileFormat) +61
Some of the code I am using:
Response.Buffer = true;
Response.Clear();
Response.ClearContent();
Response.ClearHeaders();
Response.ContentEncoding = Encoding.GetEncoding("ISO-8859-1");
Response.ContentType = "application/msword";
Response.AddHeader("Content-Disposition", "attachment;filename=xxx.doc");
Document doc = new Document("adoc.doc");
// add stuff to document...
doc.Save(Response.OutputStream, SaveFormat.FormatDocument);
What could I be doing wrong?
Thanks,
Peter