Server Error in '/' 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 9:          Dim strRequest As String
Line 10:         strRequest = CStr(Request("siteID")).Substring(Ind + 14)
Line 11:         strRequest = CStr(Request("siteID")).Substring(1, (Ind - 2)) + "/" + strRequest
Line 12:         
Line 13:         Return strRequest

Source File: C:\Inetpub\BARBinc\barbinc-sites\NotFound.aspx    Line: 11

Stack Trace:


[ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length]
   System.String.Substring(Int32 startIndex, Int32 length) +14342605
   ASP.notfound_aspx.SiteRequested() in C:\Inetpub\BARBinc\barbinc-sites\NotFound.aspx:11
   ASP.notfound_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in C:\Inetpub\BARBinc\barbinc-sites\NotFound.aspx:31
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +276
   System.Web.UI.Page.Render(HtmlTextWriter writer) +40
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4239


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