Routing requests that end in “.cshtml” to a controller

隐身守侯 提交于 2019-12-05 15:10:19

As a quick workaround, you can put a temporary browse.cshtml file at your application root and put this inside your web.config, add key="webpages:Enabled" value="false"

This is a known bug in ASP.NET WebPages, which gets implicitly loaded when you are using MVC 3. I don't think there is a straightforward way of disabling this behavior. The only workaround is to use a different extension (specifically, one that is not listed via WebPageHttpHandler.GetRegisteredExtensions())

This will be fixed in MVC 4, however. Sorry for the inconvenience.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!