MVC缺少视图

时间:2016-11-07 14:55:22

标签: c# asp.net asp.net-mvc webforms

我们有一个遗留的Web窗体应用程序,我们最近从网站项目转换为Web应用程序项目。

Web Forms项目是解决方案的“启动”项目。

有一个MVC项目,它是对Web窗体项目的引用。

在MVC项目中,有几个视图(cshtml)文件被设置为“嵌入式资源”。在Visual Studio中本地调试应用程序时,会找到并编译这些文件,并且页面可见。

发布(本地)Web窗体项目时,出现"The view 'Index' or its master was not found or no view engine supports the searched locations. The following locations were searched:"等错误

问题是如何在IIS Express上运行,而在IIS 10上运行?是否有一些配置设置我可以更新以使其工作?

1 个答案:

答案 0 :(得分:0)

WebForms项目中是否有虚拟路径提供程序?

尝试安装我的项目'EmbeddedResourceVirtualPathProvider'

  

Install-Package EmbeddedResourceVirtualPathProvider

https://github.com/mcintyre321/EmbeddedResourceVirtualPathProvider/