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.

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 52:     if (pathUrl.IsNullOrEmpty() == true)
Line 53:     {
Line 54:         LinkField newsletterPathUrlField = Model.Newsletters[0].Fields["Path URL"];
Line 55:         pathUrl = newsletterPathUrlField.LinkUrl();
Line 56:     }

Source File: c:\inetpub\wwwroot\Beliefnet\Website\Areas\Beliefnet\Views\Newsletter\WideMoreLikeThis.cshtml    Line: 54

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) +77
   System.Collections.Generic.List`1.get_Item(Int32 index) +14369976
   ASP._Page_Areas_Beliefnet_Views_Newsletter_WideMoreLikeThis_cshtml.Execute() in c:\inetpub\wwwroot\Beliefnet\Website\Areas\Beliefnet\Views\Newsletter\WideMoreLikeThis.cshtml:54
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +252
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +148
   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) +795
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +795
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +81
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +698


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