Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Closed Issue: Strange behavior with DisplayModes [143]

$
0
0
Related to this discussion: http://aspnetwebstack.codeplex.com/discussions/355549

The registery point for DispalyModes is now System.Web.WebPages.DisplayModeProvider.Instance.Modes property which is type of IList<IDisplayMode>. When I look into this collection, there are two DisplayModes by default and both of them are type of System.Web.WebPages.DefaultDisplayMode. The one of them is for mobile whose index is 0. The second one is empty.

Based on that, if I do the following inside the Application_Start:

DisplayModeProvider.Instance.Modes.RemoveAt(1);
I get the so-called ASP.NET MVC 404:

System.InvalidOperationException: The view 'Index' or its master was not found or no view engine supports the searched locations. The following locations were searched:

~/Views/Home/Index.aspx
~/Views/Home/Index.ascx
~/Views/Shared/Index.aspx
~/Views/Shared/Index.ascx
~/Views/Home/Index.cshtml
~/Views/Home/Index.vbhtml
~/Views/Shared/Index.cshtml
~/Views/Shared/Index.vbhtml

and this error message lies because ~/Views/Home/Index.cshtml is present. As for my questions:

Is this an expected behavior? If so, there is a fact here that the error message lies.
Comments: The underlying ask here to improve the error message in that case. Unfortunately we decided that this class of bugs that has a lot hit count is not going to get fixed.

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>