Server Error in '/error' Application.

startIndex cannot be larger than length of string.
Parameter name: startIndex

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: startIndex cannot be larger than length of string.
Parameter name: startIndex

Source Error:


Line 148:        
Line 149:        'Finds the Protocol for the request
Line 150:		If(FullURL.Substring(4).StartsWith("http")) Then
Line 151:			Dim uriAddress As New Uri(FullURL.Substring(4))
Line 152:			Proto = uriAddress.GetLeftPart(UriPartial.Scheme)

Source File: D:\IIS-DFS\Sites\COMMON\ErrorPages\404.aspx.vb    Line: 150

Stack Trace:


[ArgumentOutOfRangeException: startIndex cannot be larger than length of string.
Parameter name: startIndex]
   System.String.Substring(Int32 startIndex, Int32 length) +15054064
   URLValues.ParseURL() in D:\IIS-DFS\Sites\COMMON\ErrorPages\404.aspx.vb:150
   URLValues..ctor() in D:\IIS-DFS\Sites\COMMON\ErrorPages\404.aspx.vb:62
   _404.Page_Load(Object sender, EventArgs e) in D:\IIS-DFS\Sites\COMMON\ErrorPages\404.aspx.vb:890
   System.Web.UI.Control.OnLoad(EventArgs e) +106
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3785


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