Server Error in '/' Application.

There is no row at position 0.

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: There is no row at position 0.

Source Error:


Line 1622:                }
Line 1623:            }
Line 1624:            categoryContent.SubScreenName = ds.Tables["CategoryInfo"].Rows[0]["SubScreenName"].ToString();
Line 1625:
Line 1626:            return categoryContent;

Source File: C:\inetpub\wwwroot\BisunessLogic\Concrete\SQLDataBase.cs    Line: 1624

Stack Trace:


[IndexOutOfRangeException: There is no row at position 0.]
   System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) +2541686
   System.Data.DataRowCollection.get_Item(Int32 index) +20
   BisunessLogic.Concrete.SQLDataBase.GetCategoryContent(Int32 catogoryId, String langID, Int32 parentCategoryID) in C:\inetpub\wwwroot\BisunessLogic\Concrete\SQLDataBase.cs:1624
   PracticU.Controllers.HomeController.Index(Nullable`1 courseID, Nullable`1 categoryID, String langID, Boolean loadCastomPlayer, Boolean loadLangFromCoockie, Int32 parentCategoryID) in C:\inetpub\wwwroot\PracticU\Controllers\HomeController.cs:1167
   lambda_method(Closure , ControllerBase , Object[] ) +435
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +280
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +35
   System.Web.Mvc.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() +80
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +466
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +659
   System.Web.Mvc.Controller.ExecuteCore() +146
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +91
   System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +60
   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +25
   System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +60
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +426
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +172
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +158


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