Free Support Forum - aspose.com

License Empty String Pdf.ctor vs Pdf.ctor with License File

My license file has a SubscriptionExpiry date of "20120130". When I pass in the license file name to SetLicense, I then get the following error when i call the Pdf constructor:

System.AccessViolationException was unhandled
Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Source=Aspose.Pdf
StackTrace:
at Aspose.Pdf.Pdf.()
at Aspose.Pdf.Pdf..ctor()
at Cps.PdfDaemon.MakePdfHelper.MakePDF(List`1 files, String fromDir, String PdfSupportPath, Exception& except)System.AccessViolationException was unhandled
Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Source=Aspose.Pdf
StackTrace:
at Aspose.Pdf.Pdf.()
at Aspose.Pdf.Pdf..ctor()
at Cps.PdfDaemon.MakePdfHelper.MakePDF(List`1 files, String fromDir, String PdfSupportPath, Exception& except)

However, when I pass in an empty string to SetLicense, I no longer get the error. What gives?

Hello Tyler,

Thanks for using our products.

Can you please share which version of Aspose.Pdf for .NET you are using and also please share the Operating System that you are using. More along, please share the license file so that we can test the scenario at our end. Please visit the following link for information on How to send a license?

We apologize for your inconvenience.