T4MVC: Cannot use a leading .. to exit above the top directory
I'm trying to use the T4MVC project from the MVCContrib project on codeplex (v2.6.13). I'm using ASP.NET MVC 2 RTM running against .NET 4 in Visual Studio 2010.
Using the Default project template that you get when creating a new MVC 2 Web Application I modified the Home ActionLink in the Master Page to:
<%= Html.ActionLink("Home", MVC.Home.Index()) %>
Now I get an HttpException of "Cannot use a leading .. to exit above the top directory" every time I try and browse the project (F5 in VS2010).
If I remove that ActionLink then everything works just fine.
Stack Trace
[HttpException (0x80004005): Cannot use a leading .. to exit above the top directory.] 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) in 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(HtmlTextWrit开发者_运维问答er 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
I've been banging my head on this for a while now but I don't seem to be able to find anything in the documentation or related blogs that might point to the solution.
Does anyone know where I'm going wrong?
精彩评论