我有一个 MVC4 Webapp (1),它下面有一个虚拟目录,其中包含另一个独立的 Webapp,如下所示:
MainApp
Areas
SUBAPP <------ THIS is a Virtual Directory with its own Webapp
Views
_Layout_2.cshtml
Views
_Layout_1.cshtml
现在我想从 MAINAPP 管理 SUBAPP 的布局,例如:
_Layout_2.cshtml:
@{
Layout = "../../Views/_Layout_1.cshtml
}
....这给了我错误:
The virtual path '/Views/_Layout_1.cshtml' maps to another application,
which is not allowed
我怎么能做到这一点???