Server Error in '/' 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 5:          Dim filetxt As String = "", webrootPath As String, fpath As String
Line 6:          Dim urlstr As String = Request.Url.OriginalString()
Line 7:          Dim browserstr As String = Request.ServerVariables("HTTP_USER_AGENT").Substring(0, 50)
Line 8:          ' ignore various strings
Line 9:          Dim shorturlstr As String = RemoveString("http://www.oeffner.net:80", urlstr)

Source File: \\hp3-winc3-smb1.hostingp3.local\domainsw\396\3727396\user\htdocs\nonexistent.aspx    Line: 7

Stack Trace:


[ArgumentOutOfRangeException: Index and length must refer to a location within the string.
Parameter name: length]
   System.String.Substring(Int32 startIndex, Int32 length) +13148947
   ASP.nonexistent_aspx.Page_Load() in \\hp3-winc3-smb1.hostingp3.local\domainsw\396\3727396\user\htdocs\nonexistent.aspx:7
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +9851442
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


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