Free Support Forum -

No overload method for Save takes 4 arguments?


I am doing a quick evaluation of the Words software. Trying to output a dummy document to Response stream for opening in client Browser. In the Help files I read this:

Shows how to send a document to the client browser from an ASP.NET code.


Document doc = new Document(MyDir + "Document.doc");

doc.Save(Response, "Report Out.doc", ContentDisposition.Inline, null);

Compiler however complains that there are no overload of Save that takes 4 arguments. The "doc" is of type Aspose.Words.Document and the version of Aspose.words is

Out of the 5 overloads I can access, the only one that supports a stream as argument is the following. It gives a NotSupportedException at runtime:

doc.Save(Response.OutputStream, Aspose.Words.Saving.SaveOptions.CreateSaveOptions(SaveFormat.Doc));

Please help!



Thank you for additional information. Most likely you are using Aspose.Words .NET 3.5 Client Profile that is why this overload of Save method is not available .NET 3.5 Client Profile excludes System.Web and therefore HttpResponse is not available. This is entirely by design. If you need to use Aspose.Words in ASP.NET application, I would recommend you use .NET 2.0 Client Profile and the following overload of Save method:

Best regards,

Hi there,

Additionally to what Alexey has said, the .NET 2.0 DLL works fully with any version of the .NET framework 2.0 and up so you should use this.


Thanks a lot, works like a charm! :slight_smile: