Server Error in '/' Application.

Index was outside the bounds of the array.

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.IndexOutOfRangeException: Index was outside the bounds of the array.

Source Error:


Line 280:                'info-Bubble_Gum-542.aspx
Line 281:                Dim link As Array = oldpath.Split("-")
Line 282:                Dim temp As String = "/product_information.aspx?catidinfo=" & Replace(link(2), ".aspx", "")
Line 283:                incoming.RewritePath(temp)
Line 284:            Case InStr(oldpath, "gg-") ' General

Source File: C:\webroot\cloud.shayanashop.com\global.asax    Line: 282

Stack Trace:


[IndexOutOfRangeException: Index was outside the bounds of the array.]
   System.Array.InternalGetReference(Void* elemRef, Int32 rank, Int32* pIndices) +0
   System.Array.GetValue(Int32 index) +78
   Microsoft.VisualBasic.CompilerServices.Container.GetArrayValue(Object[] Indices) +162
   Microsoft.VisualBasic.CompilerServices.NewLateBinding.InternalLateIndexGet(Object Instance, Object[] Arguments, String[] ArgumentNames, Boolean ReportErrors, ResolutionFailure& Failure, Boolean[] CopyBack) +240
   Microsoft.VisualBasic.CompilerServices.NewLateBinding.ObjectLateInvokeDefault(Object Instance, Object[] Arguments, String[] ArgumentNames, Boolean ReportErrors, Boolean[] CopyBack) +123
   Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateIndexGet(Object Instance, Object[] Arguments, String[] ArgumentNames) +85
   ASP.global_asax.Application_BeginRequest(Object sender, EventArgs e) in C:\webroot\cloud.shayanashop.com\global.asax:282
   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