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 123:    var settingsPath = parent + "/Utilities/Settings";
Line 124:    /*SITE*/
Line 125:    string sitetitle = Sitecore.Context.Database.GetItem(settingsPath).Fields["ShowTitle"].ToString();
Line 126:    string SiteLogo = Sitecore.Context.Database.GetItem(settingsPath).Fields["SiteLogo"].ToString();
Line 127:    string SchedBlurb = Sitecore.Context.Database.GetItem(settingsPath).Fields["ScheduleBlurb"].ToString();

Source File: e:\approot\Views\Showpage\ShowpagesMainView.cshtml    Line: 125

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   ASP._Page_Views_Showpage_ShowpagesMainView_cshtml.Execute() in e:\approot\Views\Showpage\ShowpagesMainView.cshtml:125
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +279
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +102
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +172
   System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData) +146
   Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer) +222

[InvalidOperationException: Error while rendering view: '/Views/Showpage/ShowpagesMainView.cshtml' (model: 'Sitecore.Mvc.Presentation.RenderingModel, Sitecore.Mvc').
]
   Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer) +784
   Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Render(Renderer renderer, TextWriter writer, RenderRenderingArgs args) +27
   Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Process(RenderRenderingArgs args) +62
   (Object , Object[] ) +83
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +191
   Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args) +186
   Sitecore.Mvc.Presentation.RenderingView.Render(ViewContext viewContext, TextWriter writer) +294
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +380
   System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +33
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +263
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +403