Server Error in '/noticias' 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 18:             if (posiUltimaBarra < 0) posiUltimaBarra = 0;
Line 19: 
Line 20:             String sRequestedURL = Request.Path.Substring(posiUltimaBarra + 1, Request.Path.Length - posiUltimaBarra - 6);
Line 21:             String qString = String.Empty;
Line 22:             if (Request.QueryString.HasKeys())

Source File: d:\web\www\noticias\Global.asax    Line: 20

Stack Trace:


[ArgumentOutOfRangeException: Length cannot be less than zero.
Parameter name: length]
   System.String.Substring(Int32 startIndex, Int32 length) +14599229
   ASP.global_asax.Application_BeginRequest(Object sender, EventArgs e) in d:\web\www\noticias\Global.asax:20
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +142
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +75
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +93


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