2011-12-12 63 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");