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 34:                 else if (DosyaYolu.IndexOf("/en/medium-voltage-power-electronics/") != -1)// Eğer dosya yolunda istediğimiz değer bulunuyorsa
Line 35:                 {
Line 36:                     HttpContext.Current.RewritePath("~/en/Elvac.aspx", "", "url=" + Request.Url.Segments[3].TrimEnd('/'), true);//Url Kontorolü  
Line 37:                 }
Line 38:                 else if (dtMenu.Rows.Count > 0 || dtMarka.Rows.Count > 0 || dtHariciSayfa.Rows.Count > 0)

Source File: d:\hostingspaces\arkeene1\arkeenerji.com\wwwroot\Global.asax    Line: 36

Stack Trace:


[IndexOutOfRangeException: Index was outside the bounds of the array.]
   ASP.global_asax.Application_BeginRequest(Object sender, EventArgs e) in d:\hostingspaces\arkeene1\arkeenerji.com\wwwroot\Global.asax:36
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +144
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +50
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +73


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