集成Web窗体和MVC项目

时间:2014-06-27 15:51:13

标签: asp.net asp.net-mvc vb.net webforms

我正在将MVC项目与我当前的Web窗体应用程序集成。我使用Nuget将MVC安装到解决方案中(基于我做过的一些阅读,建议这样做会添加必要的二进制文件和配置)。然后我在解决方案中添加了一个新的MVC项目,并为MVC路由编辑了以下Global.asax.vb文件:

Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
    ' Code that runs on application startup
     MVC.RouteConfig.RegisterRoutes(RouteTable.Routes)
End Sub

但是当我运行应用程序时,我收到以下错误:

System Error

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

0 个答案:

没有答案