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
Using ClientDependency to render CSS and JS files on a layout which is then used by an error.cshtml razor view does not render the css or js.
This error view is triggered via Application_Error call to an errors controller. The resulting DOM contains <!--[Css:Name="StandardRenderer"]//--> where the css statements would normally appear.
If you navigate directly to the error view then css/js files are loaded without issue. Only when the view is served via Application_Error does this issue occur.
The following is the code used to call the controller method
Using the CdfRazorViewEngine alleviates this issue, however when using this view engine then an error is thrown for any view that attempts to load a partial.
This error occurs on line 46 in PlaceholderPraser.cs. The SingeOrDefault call fails since there is more than one "StandardRender" in the output object.
This occurs regardless of the partial view having any clientdependency calls and with only a single @Html.RenderCssHere() and @Html.RenderJsHere() in the associated layout.
The text was updated successfully, but these errors were encountered:
Sounds like a bug to be fixed with the CdfRazorViewEngine approach. The normal approach uses an httpmodule to parse the results but if an error occurs, its certainly possible that the request filter no longer applies and maybe even a request .end is called.
I might suggest though that if an application error occurs, in some cases you'd have to assume that your entire application is down and cannot run any .NET code. I've seen this many time and that's why normally for error pages I use static html pages (no server side logic)
Using ClientDependency to render CSS and JS files on a layout which is then used by an error.cshtml razor view does not render the css or js.
This error view is triggered via
Application_Error
call to an errors controller. The resulting DOM contains<!--[Css:Name="StandardRenderer"]//-->
where the css statements would normally appear.If you navigate directly to the error view then css/js files are loaded without issue. Only when the view is served via
Application_Error
does this issue occur.The following is the code used to call the controller method
Using the
CdfRazorViewEngine
alleviates this issue, however when using this view engine then an error is thrown for any view that attempts to load a partial.This error occurs on line 46 in PlaceholderPraser.cs. The
SingeOrDefault
call fails since there is more than one "StandardRender" in the output object.This occurs regardless of the partial view having any clientdependency calls and with only a single
@Html.RenderCssHere()
and@Html.RenderJsHere()
in the associated layout.The text was updated successfully, but these errors were encountered: