Lar*_*ard 2 asp.net iis asp.net-mvc asp.net-mvc-4
我有一个在我的本地IIS上完美运行的站点.
我的所有页面都使用默认的共享局部视图,称为预期_Layout.cshtml.此视图位于我的共享文件夹中.这可以在这里看到:

正如我所料,这完美地运作.
但是,我现在发布我的网站.然后,我的一些页面之外的HomeController结果是:
The view 'Index' or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/Views/Search/Index.aspx
~/Views/Search/Index.ascx
~/Views/Shared/Index.aspx
~/Views/Shared/Index.ascx
~/Views/Search/Index.cshtml
~/Views/Search/Index.vbhtml
~/Views/Shared/Index.cshtml
~/Views/Shared/Index.vbhtml
Run Code Online (Sandbox Code Playgroud)
这当然是正确的,但我希望它能够_Layout.cshtml在我的共享文件夹中搜索,而不是这些文件名.
我该怎么做才能解决它?为什么它适用于我的本地IIS,而不是生产?
| 归档时间: |
|
| 查看次数: |
832 次 |
| 最近记录: |