Hello,
We've changed the logic to leveage a static License class that gets instantiated only once in a Generate method using a singleton-like pattern. We tested to ensure that only 1 instance of License is instantiated and calls the SetLicense method in test and this works.
When we run this in production (Windows Server 2003 R2, 64-Bit) with 8 processes, the first 6 fail and the last 2 succeed. The first 6 fail with a combination of the following errors:
Message: Index was outside the bounds of the array. (2 occurences)
Stack: at System.Collections.ArrayList.Add(Object value)
at x22bcffa34b42a390.x220f433da4115056.xdc195f1c5804967a()
at x22bcffa34b42a390.x220f433da4115056.x7d0214bf69711dd9(Stream xcf18e5243f8d5fd3)
at x22bcffa34b42a390.x220f433da4115056.x7d0214bf69711dd9(String x1c1fc72fe1a3b4ea, Assembly x5807f920b6fc67c4)
at Aspose.Pdf.Kit.License.SetLicense(String licenseName)
Message: Object reference not set to an instance of an object. (3 occurences)
Stack: at x22bcffa34b42a390.x220f433da4115056.x7d0214bf69711dd9(Stream xcf18e5243f8d5fd3)
at x22bcffa34b42a390.x220f433da4115056.x7d0214bf69711dd9(String x1c1fc72fe1a3b4ea, Assembly x5807f920b6fc67c4)
at Aspose.Pdf.Kit.License.SetLicense(String licenseName)
Message: Source array was not long enough. Check srcIndex and length, and the array's lower bounds. (1 occurence)
Stack: at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
at System.Collections.ArrayList.set_Capacity(Int32 value)
at System.Collections.ArrayList.EnsureCapacity(Int32 min)
at System.Collections.ArrayList.Add(Object value)
at x22bcffa34b42a390.x220f433da4115056.xdc195f1c5804967a()
at x22bcffa34b42a390.x220f433da4115056.x7d0214bf69711dd9(Stream xcf18e5243f8d5fd3)
at x22bcffa34b42a390.x220f433da4115056.x7d0214bf69711dd9(String x1c1fc72fe1a3b4ea, Assembly x5807f920b6fc67c4)
at Aspose.Pdf.Kit.License.SetLicense(String licenseName)
Please advise - this is quite critical.
Ali