Server Error in '/' Application.

Object reference not set to an instance of an object.

Description: An unhandled exception occurred.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:


Line 1:  @model McGuireWoods.Sc.Models.Global.Components.BlogLink
Line 2:  @{
Line 3:      var url = Model.Url ?? "#";
Line 4:      var target = Model.Link?.Target ?? "";
Line 5:      var imageSrc = Model.Image?.Src ?? "/-/media/images/icons/blog-1.jpg";

Source File: F:\inetpub\wwwroot\mwcllc-design.com\web\Views\RelatedResourcesListing\DisplayTemplates\BlogLink.cshtml    Line: 3

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   ASP._Page_Views_RelatedResourcesListing_DisplayTemplates_BlogLink_cshtml.Execute() in F:\inetpub\wwwroot\mwcllc-design.com\web\Views\RelatedResourcesListing\DisplayTemplates\BlogLink.cshtml:3
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +251
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +147
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +121
   System.Web.Mvc.Html.ActionCacheViewItem.Execute(HtmlHelper html, ViewDataDictionary viewData) +224
   System.Web.Mvc.Html.TemplateHelpers.ExecuteTemplate(HtmlHelper html, ViewDataDictionary viewData, String templateName, DataBoundControlMode mode, GetViewNamesDelegate getViewNames, GetDefaultActionsDelegate getDefaultActions) +585
   System.Web.Mvc.Html.TemplateHelpers.TemplateHelper(HtmlHelper html, ModelMetadata metadata, String htmlFieldName, String templateName, DataBoundControlMode mode, Object additionalViewData, ExecuteTemplateDelegate executeTemplate) +1401
   System.Web.Mvc.Html.TemplateHelpers.TemplateHelper(HtmlHelper html, ModelMetadata metadata, String htmlFieldName, String templateName, DataBoundControlMode mode, Object additionalViewData) +129
   System.Web.Mvc.Html.TemplateHelpers.TemplateFor(HtmlHelper`1 html, Expression`1 expression, String templateName, String htmlFieldName, DataBoundControlMode mode, Object additionalViewData) +168
   System.Web.Mvc.Html.DisplayExtensions.DisplayFor(HtmlHelper`1 html, Expression`1 expression) +81
   ASP._Page_Views_RelatedResourcesListing_Listing_cshtml.Execute() in F:\inetpub\wwwroot\mwcllc-design.com\web\Views\RelatedResourcesListing\Listing.cshtml:266
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +251
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +147
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +121
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +377
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +90
   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.4700.0