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 42:                 if (dtMenu.Rows.Count > 0 || dtMarka.Rows.Count > 0 || dtHariciSayfa.Rows.Count > 0)
Line 43:                 {
Line 44:                     HttpContext.Current.RewritePath("~/en/Icerikler.aspx", "", "url=" + Request.Url.Segments[2].TrimEnd('/'), true);//Url Kontorolü
Line 45:                 }
Line 46: 

Source File: c:\inetpub\vhosts\galata.edu.tr\httpdocs\Global.asax    Line: 44

Stack Trace:


[IndexOutOfRangeException: Index was outside the bounds of the array.]
   ASP.global_asax.Application_BeginRequest(Object sender, EventArgs e) in c:\inetpub\vhosts\galata.edu.tr\httpdocs\Global.asax:44
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +141
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +48
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +71


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