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:


Line 47: </div> Line 48: <div class="blog-content"> Line 49: <h4><a href="#@nId" class="lightbox bg-lblue" data-toggle="modal">@Model.NewsVm[i].Title</a></h4> Line 50: <ul class="blog-meta"> Line 51: <li><a href="#">@Model.NewsVm[i].Subtitle</a></li>

Source File: d:\inetpub\vhosts\aggcomne-3435.package\aggcom.net\wwwroot\Views\Home\Media.cshtml    Line: 49

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) +75 System.Collections.Generic.List`1.get_Item(Int32 index) +46 ASP._Page_Views_Home_Media_cshtml.Execute() in d:\inetpub\vhosts\aggcomne-3435.package\aggcom.net\wwwroot\Views\Home\Media.cshtml:49 System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +252 System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +148 System.Web.WebPages.StartPage.ExecutePageHierarchy() +86 System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +107 System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +378 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +91 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +793 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +81 System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +970 System.Web.Mvc.Controller.ExecuteCore() +131 System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +238 System.Web.Mvc.Async.<>c.<.cctor>b__15_0(IAsyncResult asyncResult, Action action) +24 System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +38 System.Web.Mvc.<>c.<BeginProcessRequest>b__20_1(IAsyncResult asyncResult, ProcessRequestState innerState) +43 System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +73 System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +38 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +651 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +220 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +134


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