我有一个MVC网站在本地运行良好,但当我将其部署到我的Azure网站时,除了主页索引页面之外,每个网页都会出现此错误.
The view 'Index' or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/Views/Sales/Index.aspx
~/Views/Sales/Index.ascx
~/Views/Shared/Index.aspx
~/Views/Shared/Index.ascx
~/Views/Sales/Index.cshtml
~/Views/Sales/Index.vbhtml
~/Views/Shared/Index.cshtml
~/Views/Shared/Index.vbhtml
Run Code Online (Sandbox Code Playgroud)
如有必要,我可以提供更多信息,但我无法在此问题的所有报告中找到任何具有相同问题的人.大多数人合法地将文件的问题放在了错误的地方.但是,我的控制器和视图的结构很好,它们在本地工作.它只能在部署到我的Azure网站时找不到视图.