You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 10, 2021. It is now read-only.
Per this StackOverflow answer, my understanding is that my error views (404.cshtml, etc) should pick up the standard _ViewStart.cshtml and thus be rendered within my _Layout.cshtml like all my other views, but this is not working.
If I add the contents of _ViewStart.cshtml to my error view manually, I do get my error view rendered within my _Layout.cshtml as expected:
Looking at the error views in the sample project, I see they are written as full HTML documents, but this goes against the rest of the Asp.Net MVC convention. Instead, error views should pick up _ViewStart.cshtml (if present).
Here is a suggested fix to CustomErrorHandlingModule.RenderCustomErrorView(). Pass in true instead of false for the runViewStartPages value:
Per this StackOverflow answer, my understanding is that my error views (404.cshtml, etc) should pick up the standard _ViewStart.cshtml and thus be rendered within my _Layout.cshtml like all my other views, but this is not working.
If I add the contents of _ViewStart.cshtml to my error view manually, I do get my error view rendered within my _Layout.cshtml as expected:
Looking at the error views in the sample project, I see they are written as full HTML documents, but this goes against the rest of the Asp.Net MVC convention. Instead, error views should pick up _ViewStart.cshtml (if present).
Here is a suggested fix to CustomErrorHandlingModule.RenderCustomErrorView(). Pass in true instead of false for the runViewStartPages value:
The text was updated successfully, but these errors were encountered: