Free Support Forum - aspose.com

Error after server migration

I’ve moved my site that uses Aspose.words to a new server and now when I try to create a document I get the following error message.


Attempted to read or write protected memory. This is often an indication that other memory is corrupt.


Google reveals that the most recommended method for fixing this error is to upgrade to the latest version of the component. My site uses version 4.4.2.0 and I see that there’s a hotfix version 4.4.3.0, but the download link doesn’t work. I’m guessing my license wouldn’t allow me to uses any version above 4. Please let me know how to go about correcting this issue.

Thanks

Hello

Thanks for your request. It seems this problem was fixed in 5.1 version of Aspose.Words. But our internal policy does not allow us to share versions of products older than one year. You can only download versions of Aspose.Words available here:

http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/category1188.aspx

Could you please try using the latest version of Aspose.Words and let me know how it goes on your side.

Best regards,

I have upgraded to version 10.4 and am still having the same issue. The website is on win server 2008 and the app pool runs under the network service account. The method that generates the error is the following. Please let me know if you would like me to send the entire source code.


public void GenerateWordDoc(HttpResponse response, int styleNumber)
{
string templateDir = HttpContext.Current.Server.MapPath(string.Format("~/templates/{0}", template.AveryNumber));
string templateFile = string.Format("{0}style{1}.doc", template.AveryNumber, styleNumber);
Document doc = new Document(Path.Combine(templateDir, templateFile));

ProductMergeDataSource dataSource = new ProductMergeDataSource(labels);
doc.MailMerge.Execute(dataSource);
doc.MailMerge.DeleteFields();
string saveFileName = string.Format("Labels{0}.doc", template.AveryNumber);
doc.Save(response, saveFileName, ContentDisposition.Attachment, null);
}

Hello

Thanks for your inquiry. Unfortunately, I cannot reproduce the problem on my side. Could you please create simple application, which will demonstrate the problem on my side? I will check it and provide you more information.

Best regards,

I was able to resolve the problem myself by upgrading the site to use version 4 of the dot net framework. Thank you

Hi

It is perfect, that you already found solution. Please let me know in case of any issues. I will be glad to help you.

Best regards,