Free Support Forum - aspose.com

Index was outside the bouds of the Array - Using SetLicence

We have a production systme that has been using Aspose without error for a considerable period of time. Today an error started to apear that I canot make any sense of.

Index was outside the bounds of the array.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IndexOutOfRangeException: Index was outside the bounds of the array.

Source Error:

Line 24: 
Line 25:         Aspose.Pdf.Kit.License kitLic = new Aspose.Pdf.Kit.License();
Line 26:         kitLic.SetLicense(@"C:\Program Files\Aspose\Aspose.Total\Aspose.Total.lic");
Line 27: 
Line 28:         if (Request.QueryString["function"].ToString() == "2")

Source File: c:\Inetpub\wwwroot\SCID\submission_coversheet.aspx.cs Line: 26

Stack Trace:

[IndexOutOfRangeException: Index was outside the bounds of the array.]
   System.Collections.ArrayList.get_Item(Int32 index) +2806355
   x22bcffa34b42a390.x220f433da4115056.x7d0214bf69711dd9(Stream xcf18e5243f8d5fd3) +114
   x22bcffa34b42a390.x220f433da4115056.x7d0214bf69711dd9(String x1c1fc72fe1a3b4ea, Assembly x5807f920b6fc67c4) +78
   Aspose.Pdf.Kit.License.SetLicense(String licenseName) +37
   submission_coversheet.Page_Load(Object sender, EventArgs e) in c:\Inetpub\wwwroot\SCID\submission_coversheet.aspx.cs:26
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +33
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +47
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436

Any help greatly appreciated.

Hi Shane,

We’re very sorry for the inconvenience.

Can you please share whether this error appeared once or it is appearing continuously? Did you make any change in the application?

Please share the license file following the instructions given at the following link: How to send license to Aspose staff.

Also, if you can share a small sample project that can reproduce the same problem at our end that will be helpful in problem identification and resolution.

We appreciate your patience and cooperation.
Regards,