Server Error in '/' Application.

The file "~/default-layout.cshtml" cannot be requested directly because it calls the "RenderSection" method.

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.Web.HttpException: The file "~/default-layout.cshtml" cannot be requested directly because it calls the "RenderSection" method.

Source Error:


Line 20:     <meta name="google-site-verification" content="MfjG748TPaC6dc0u2IMgAHpnZP0XWgtDnNSvdpBEIJ8" />
Line 21: 
Line 22:     <title>@RenderSection("PageTitle")</title>
Line 23: 
Line 24:     <link rel="stylesheet" type="text/css" href="/_SiteService/Style/reset.css" />

Source File: d:\Websites\jackzheng.net\default-layout.cshtml    Line: 22

Stack Trace:


[HttpException (0x80004005): The file "~/default-layout.cshtml" cannot be requested directly because it calls the "RenderSection" method.]
   System.Web.WebPages.WebPageBase.EnsurePageCanBeRequestedDirectly(String methodName) +181
   System.Web.WebPages.WebPageBase.RenderSection(String name, Boolean required) +80
   ASP._Page_default_layout_cshtml.Execute() in d:\Websites\jackzheng.net\default-layout.cshtml:22
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +252
   System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) +99
   System.Web.WebPages.WebPage.ExecutePageHierarchy() +182
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +107
   System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContextBase httpContext) +142


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