3
的使用版式文件我有一個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
如何腠我達到了這個?
檢查這可能有所幫助:http://stackoverflow.com/questions/13277126/force-all-areas-to-use-same-layout – 2013-08-30 06:16:34