Server Error in '/' Application.

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

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.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]
   System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) +72
   System.Collections.Generic.List`1.get_Item(Int32 index) +14898063
   BettorLogic.Direct.Football.View.MatchViewer.GetMatchRoundList(UnilabplusDBDataContext db, MCLeague league) in C:\Users\ChristianW\Documents\svn\Football\BettorLogic.Direct\BettorLogic.Direct.Football.View\MatchViewer.cs:58
   BettorLogic.Direct.Football.View.FutureMatchViewer.GetFutureMatches() in C:\Users\ChristianW\Documents\svn\Football\BettorLogic.Direct\BettorLogic.Direct.Football.View\FutureMatchViewer.cs:256
   BettorLogic.Direct.Football.View.FutureMatchViewer.get_FutureMatchesList() in C:\Users\ChristianW\Documents\svn\Football\BettorLogic.Direct\BettorLogic.Direct.Football.View\FutureMatchViewer.cs:35
   BettorLogic.Direct.Football.View.LoadCache.LoadCMSCachedEntities() in C:\Users\ChristianW\Documents\svn\Football\BettorLogic.Direct\BettorLogic.Direct.Football.View\LoadCache.cs:70
   ASP.global_asax.Application_Start(Object sender, EventArgs e) +18

[HttpException (0x80004005): Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]
   System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +520
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +176
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +165
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +267
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +341

[HttpException (0x80004005): Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +523
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +107
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +688


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