Technical issue using the Aspose pdf license

Hello,

We use the Aspose PDF tool (license type:- Enterprise) for one of our websites.
Apparently sometime we get exception which is as below :-

System.NullReferenceException: Object reference not set
to an instance of an object.

at Aspose.Pdf..(Stream ֒)

at Aspose.Pdf..(String , Assembly )

at Aspose.Pdf.License.SetLicense(String licenseName)

<span style=“font-size: 11pt; font-family: “Calibri”,“sans-serif”;”> at LoadAsposeLicense()

The code used for loading the license file is as follows :-
<span style=“font-size: 11pt; font-family: “Calibri”,“sans-serif”;”>LoadAsposeLicense()
{
_AsposeLicense = new Aspose.Pdf.License();
_AsposeLicense.SetLicense(“Aspose.Pdf.lic”);
}

I double checked that the license file (Aspose.Pdf.lic) is in the same directory as the executable file.
Interesting thing here is that it happens only sometimes, not everytime …I would appreciate any quick help in this matter .

Thanks,
Harshal

Hello Harshal,

Thanks for considering Aspose.

I'm not sure why you are facing such problems. Can you please visit the following link and try using the technique to include it as an embedded resource into one of the assemblies that calls Aspose.Pdf for .NET. Licensing.

In case it does not resolve your problem or you have any further query, please feel free to contact.