Server Error in '/' Application.

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

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.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Source Error:


Line 264:                _id = int.Parse(HttpContext.Current.Request.QueryString[typeof(T).Name]);
Line 265:            else
Line 266:                _id = WebPage.Load("URLName = @URLName", "@URLName", string.Format(ConfigurationSettings.AppSettings["preName"] + "_{0}_{1}.aspx", Settings.LanguageName.ToString(), HttpContext.Current.Request.QueryString[typeof(T).Name]))[0].id;
Line 267:        }
Line 268:        return Deserialize(string.Format("{0}={1}", typeof(T).Name, _id));

Source File: d:\hshome\gilon\gilon.com\App_Code\Active Records\Base Classes\ActiveRecord.cs    Line: 266

Stack Trace:


[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]
   System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) +62
   System.ThrowHelper.ThrowArgumentOutOfRangeException() +12
   System.Collections.Generic.List`1.get_Item(Int32 index) +2650868
   ActiveRecord`1.FromQueryString() in d:\hshome\gilon\gilon.com\App_Code\Active Records\Base Classes\ActiveRecord.cs:266
   _Default.GetWebPage() in d:\hshome\gilon\gilon.com\Default.aspx.cs:39
   _Default.get_WebPage() in d:\hshome\gilon\gilon.com\Default.aspx.cs:21
   _Default.Bind() in d:\hshome\gilon\gilon.com\Default.aspx.cs:77
   _Default.Page_Load(Object sender, EventArgs e) in d:\hshome\gilon\gilon.com\Default.aspx.cs:69
   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


Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433