T4MVC:无法使用前导..退出顶级目录

时间:2010-09-10 11:55:43

标签: asp.net-mvc asp.net-mvc-2 t4mvc

我正在尝试在codeplex(v2.6.13)上使用MVCContrib项目中的T4MVC项目。 我正在使用Visual Studio 2010中针对.NET 4运行的ASP.NET MVC 2 RTM。

使用创建新MVC 2 Web应用程序时获得的默认项目模板,我将主页面中的Home ActionLink修改为:

<%= Html.ActionLink("Home", MVC.Home.Index()) %>

现在我每次尝试浏览项目时都会遇到“无法使用前导..退出顶层目录”的HttpException(VS2010中的F5)。

如果我删除了那个ActionLink,那么一切正常。

堆栈跟踪

  

[HttpException(0x80004005):无法使用前导..退出顶级目录。]      System.Web.Util.UrlPath.ReduceVirtualPath(String path)+8774912      System.Web.Util.UrlPath.Reduce(String path)+52      System.Web.Util.UrlPath.Combine(String appPath,String basepath,String relative)+217      System.Web.UI.Control.ResolveClientUrl(String relativeUrl)+258      System.Web.UI.HtmlControls.HtmlLink.RenderAttributes(HtmlTextWriter writer)+74      System.Web.UI.HtmlControls.HtmlLink.Render(HtmlTextWriter writer)+42      System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer,ControlAdapter adapter)+27      System.Web.UI.Control.RenderControl(HtmlTextWriter writer,ControlAdapter adapter)+100      System.Web.UI.Control.RenderControl(HtmlTextWriter writer)+25      System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer,ICollection children)+208      System.Web.UI.HtmlControls.HtmlHead.RenderChildren(HtmlTextWriter writer)+21      System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)+31      System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer,ControlAdapter adapter)+27      System.Web.UI.Control.RenderControl(HtmlTextWriter writer,ControlAdapter adapter)+100      System.Web.UI.Control.RenderControl(HtmlTextWriter writer)+25      ASP.views_shared_site_master .__ Render__control1(HtmlTextWriter __w,Control parameterContainer)在c:\ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ Temporary ASP.NET Files \ root \ 82809071 \ 51b73fea \ App_Web_uers1hdy.1.cs:0      System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer,ICollection children)+109      System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)+8      System.Web.UI.Control.Render(HtmlTextWriter writer)+10      System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer,ControlAdapter adapter)+27      System.Web.UI.Control.RenderControl(HtmlTextWriter writer,ControlAdapter adapter)+100      System.Web.UI.Control.RenderControl(HtmlTextWriter writer)+25      System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer,ICollection children)+208      System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)+8      System.Web.UI.Page.Render(HtmlTextWriter writer)+29      System.Web.Mvc.ViewPage.Render(HtmlTextWriter writer)+56      System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer,ControlAdapter adapter)+27      System.Web.UI.Control.RenderControl(HtmlTextWriter writer,ControlAdapter adapter)+100      System.Web.UI.Control.RenderControl(HtmlTextWriter writer)+25      System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,Boolean includeStagesAfterAsyncPoint)+3060

我一直在讨论这个问题已有一段时间,但我似乎无法在文档或相关博客中找到任何可能指向解决方案的内容。

有谁知道我哪里出错了?

0 个答案:

没有答案