Save method s not working

Hi

Last week I have changed my computer, and all the software installed as same as previous computer.

But on new computer I am getting error in document.save method:

Error: Overload resolution failed because no accessible ‘Save’ accepts this number of arguments.

Not able to understand whats wrong in new computers installation.

I am using same asp.net project which was working fine on previous computer.

Please suggest on this issue.

Appreciate all your help.

Regards

Somnath

Hi Santosh,

Thanks for sharing the details.

Seems like you were using the old version of Aspose.Words and with new installation the latest version has been installed on your new computer. Have you downloaded the latest MSI setup available on Aspose.Words official download page? Please verify the version of the Aspose.Words.dll from inside your project. You can see it under project References->Aspose.Wods->Properties. The version of the latest Aspose.Words API should be 13.1.0. If so please update the code to use the appropriate overloaded method. Here are the overloads for Save method that are available in the latest version of Aspose.Words:

public SaveOutputParameters Save(string fileName); public SaveOutputParameters Save(Stream stream, SaveFormat saveFormat); public SaveOutputParameters Save(Stream stream, SaveOptions saveOptions); public SaveOutputParameters Save(string fileName, SaveFormat saveFormat); public SaveOutputParameters Save(string fileName, SaveOptions saveOptions); public SaveOutputParameters Save(System.Web.HttpResponse response, string fileName,

ContentDisposition contentDisposition, SaveOptions saveOptions);

Please make sure that one of these methods is used while saving the document.

Hope this helps. Please do let us know if you have any more queries.

I just upgraded to 13.1, how come I don’t have this overload:
public SaveOutputParameters Save(System.Web.HttpResponse response, string fileName, ContentDisposition contentDisposition, SaveOptions saveOptions);
?

Hi Santosh,

Thanks for your inquiry.

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 and the following overload of Save method:

Moreover, I would suggest you please read the following article which outlines how to send a document to client’s browser:

I hope, this helps.

Best regards,