2011-12-12 56 views
1

我的代码工作正常,但我得到很多的警告,如下列:如何避免MVC3中的剃须刀路径错误警告?

@model WebUx.Areas.Administration.ViewModels.Shared.BaseViewModel 
@{ 
    Layout = "~/Areas/Administration/Views/Accounts/_Layout.cshtml"; 
    Session["CurrentUrl"] = Request.Url.ToString(); 
    Session["CurrentHost"] = Request.Headers["Host"]; 
} 

如何避免报警称警告

7 
C:\Code J\T69 Dec 8\WebUx\Areas\Administration\Views\Accounts\ShowSummary.cshtml: 
ASP.NET runtime error: Failed to map the path '/'. 
C:\Code J\T69 Dec 8\WebUx\Areas\Administration\Views\Accounts\ShowSummary.cshtml 
+0

你在IIS中托管你的应用程序? –

回答

0

希望这个作品

Layout = @Url.Content("~/Areas/Administration/Views/Accounts/_Layout.cshtml");