Server Error in '/en' Application.

Index and length must refer to a location within the string.
Parameter name: length

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 and length must refer to a location within the string.
Parameter name: length

Source Error:


Line 140:        if (HttpContext.Current.Request.RawUrl.Contains("&"))
Line 141:        {
Line 142:            PageInformation.Current.Canonical = "https://www.gita-jewelry.com"+ HttpContext.Current.Request.RawUrl.Replace("Default.aspx", "").Replace("default.aspx", "").Replace("Tagid", "TagID").Replace("tagid", "TagID").Replace("TagId", "TagID").Substring(0, HttpContext.Current.Request.RawUrl.IndexOf("&"));
Line 143:        }
Line 144:        else

Source File: c:\inetpub\wwwroot\en\catalog\a\collection\content.ascx    Line: 142

Stack Trace:


[ArgumentOutOfRangeException: Index and length must refer to a location within the string.
Parameter name: length]
   System.String.Substring(Int32 startIndex, Int32 length) +14599300
   ASP.Content.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\en\catalog\a\collection\content.ascx:142
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4700.0