We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

SetLicense -System.NullReferenceException/ Object reference not set to an instance

We are using Aspose.Pdf (Version=10.5.0.0) to Combine Multiple PDF’s into Single PDF and while Setting The License file, we are getting below error.
We tried setting up the License file to read from the Physical file as well as File Stream but we are get the same error. This is intermittent error and the occurrence is not assured and comes randomly in the server.
Usually the issue gets resolved by doing App Pool Recycle and IIS reset which is not an feasible option always on production servers.

This issue was identified in older version of Aspose.pdf so we went with the Upgrade version hoping that it was fixed in latest versions.

Can you take a look at this issue at earlies and get back?

Error 1:
System.NullReferenceException: Object reference not set to an instance of an object. at ?


. .?(Stream ) at Aspose.Pdf.License.SetLicense(Stream stream)

Set Licence Memory stream failed

System.IndexOutOfRangeException: At most 4 elements (for any collection) can be viewed in evaluation mode. at Aspose.Pdf.PageCollection.get(Int32 ) at Aspose.Pdf.PageCollection.Add(Page , ?


) at Aspose.Pdf.PageCollection.Add(ICollection , ?


)

-Aditya

We are using Aspose.Pdf (Version=10.5.0.0) to Combine Multiple PDF’s into Single PDF and while Setting The License file, we are getting below error.
We tried setting up the License file to read from the Physical file as well as File Stream but we are get the same error. This is intermittent error and the occurrence is not assured and comes randomly in the server.
Usually the issue gets resolved by doing App Pool Recycle and IIS reset which is not an feasible option always on production servers.

This issue was identified in older version of Aspose.pdf so we went with the Upgrade version hoping that it was fixed in latest versions.
System.NullReferenceException: Object reference not set to an instance of an object. at ?
_______________________________________Error
_

. .?(Stream ) at Aspose.Pdf.License.SetLicense(Stream stream)

Set Licence Memory stream failed

System.IndexOutOfRangeException: At most 4 elements (for any collection) can be viewed in evaluation mode. at Aspose.Pdf.PageCollection.get(Int32 ) at Aspose.Pdf.PageCollection.Add(Page , ?


) at Aspose.Pdf.PageCollection.Add(ICollection , ?


)

Hi Aditya,


Thanks for contacting support.

Recently some customers also encountered license initialization issue where license was not being initialized and in order to resolve this problem, a hotfix of Aspose.Pdf for .NET 11.1.1 was released. Please try using the latest release and in case you still face any issue or you have any further query, please feel free to contact.