Hi There,
We are using multiple flavors of aspose (Cells, Email, PDF, Doc) and one of them is Aspose.PDF. We are using Aspose in class library. We recently encountered following exception (Over the course of last 10 years, this may be 6th time SetLicense caused grief):
Type of exception: System.IndexOutOfRangeException
Exception level [2] Msg [Index was outside the bounds of the array.] Stack trace below:
at #=zmfM8xsCSe5YjPDyB_uPtsZY=.#=z3CFKlUIlooq_(Stream #=zIm3CH5M=)
at #=zmfM8xsCSe5YjPDyB_uPtsZY=.#=z3CFKlUIlooq_(String #=z4d$uoQg=, Assembly #=z6xtCVOI=)
at Aspose.Pdf.License.SetLicense(String licenseName)
Issue was automatically resolved when windows service was restarted.
We have been setting license in class constructors, where library is used;
We are not sure of the cause for this exception. I have looked in different other posts related to SetLicense and the most common official suggestion I found was, to SetLicense in “Static Constructor”
If setting license in static constructor is correct way for PDF, does it apply to other flavors of Aspose as well?
Looking forward to resolution,
Cheers, Bhavin
This Topic is created by asad.ali using Email to Topic tool.