Server Error in '/' Application.

StartIndex cannot be less than zero.
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 less than zero.
Parameter name: startIndex

Source Error:


Line 18:                 if (!id.Contains("?"))
Line 19:                 {
Line 20:                     Int32 idString = Convert.ToInt32(id.Remove(id.Length - 5));
Line 21: 
Line 22:                     //String idString = path.Substring(path.LastIndexOf('/') + 1, path.Length - path.LastIndexOf('_') - 6);

Source File: d:\inetpub\vhosts\cartraja.com\sringaar.in\Global.asax    Line: 20

Stack Trace:


[ArgumentOutOfRangeException: StartIndex cannot be less than zero.
Parameter name: startIndex]
   System.String.Remove(Int32 startIndex) +3121012
   ASP.global_asax.Application_BeginRequest(Object sender, EventArgs e) in d:\inetpub\vhosts\cartraja.com\sringaar.in\Global.asax:20
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75


Version Information: Microsoft .NET Framework Version:2.0.50727.9174; ASP.NET Version:2.0.50727.9175