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 5:  	Protected Sub Application_BeginRequest(ByVal sender As Object, ByVal e As System.EventArgs)
Line 6:  		'AddHandler JBL.lm.listingDetails.DetailsPagePreRender, AddressOf DetailsPagePreRenderHandler
Line 7:  		JBL.initializer.initialize()
Line 8:  	End Sub
Line 9:  	Protected Sub Application_EndRequest(ByVal sender As Object, ByVal e As System.EventArgs)

Source File: C:\inetpub\wwwroot\ds2.joyceinc.com\httpdocs2018\global.asax    Line: 7

Stack Trace:


[ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length]
   System.String.Substring(Int32 startIndex, Int32 length) +15054132
   JBL._Closure$__1-1._Lambda$__3(route r) in C:\Users\MJoyce\source\repos\JoyceDevOps\JBL\initializer.vb:168
   System.Collections.Generic.List`1.Find(Predicate`1 match) +64
   JBL.initializer.initialize() in C:\Users\MJoyce\source\repos\JoyceDevOps\JBL\initializer.vb:168
   ASP.global_asax.Application_BeginRequest(Object sender, EventArgs e) in C:\inetpub\wwwroot\ds2.joyceinc.com\httpdocs2018\global.asax:7
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +139
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +195
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +88


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