Server Error in '/SuperAgent' Application.

Length cannot be less than zero.
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: Length cannot be less than zero.
Parameter name: length

Source Error:


Line 103:        //}
Line 104:        _logger.Error(HttpUtility.HtmlEncode(url));
Line 105:        url = url.Substring(0, url.IndexOf('&'));
Line 106:        Response.Redirect(url, true);
Line 107:

Source File: c:\inetpub\aiabx-superagent.aiaazure.biz\SuperAgent\PopupRedirect.aspx.cs    Line: 105

Stack Trace:


[ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length]
   System.String.Substring(Int32 startIndex, Int32 length) +14599229
   PopupRedirect.Page_Load(Object sender, EventArgs e) in c:\inetpub\aiabx-superagent.aiaazure.biz\SuperAgent\PopupRedirect.aspx.cs:105
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +154
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4082


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