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 193:                Catch
Line 194:                End Try
Line 195:                Dim temp As String = "/productdetail.aspx?productid=" & link(1) & "&selection=" & link(3) & "&categoryid=" & link(2) & "&cat=" & newpath(1) & "&subcat=" & subcatname & "&prodname=" & Replace(newpath(newpath.Length - 1), ".aspx", "") & "&inurl=" & oldpath & referid
Line 196:                If Request.Params("reviewid") > "" Then
Line 197:                    temp = temp & "&reviewid=" & Request.Params("reviewid") & "&vote=" & Request.Params("vote")

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

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:195
   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