Note that there are some explanatory texts on larger screens.

plurals
  1. POurl rewrite and mvc causing Exception
    primarykey
    data
    text
    <p>I'm using IIS URL Rewrite to rewrite "/about" to "/home/about".</p> <p>If I use any helper that generates a relative url like "@Url.Content" or "@using(Html.BeginForm(Action, Controller)", it gives me an exception:</p> <pre><code>System.Web.HttpException: Cannot use a leading .. to exit above the top directory. </code></pre> <p>It's very easy to reproduce the exception and I'm very frustated that I haven't found a solution yet. Any ideas? Thanks in advance.</p> <p>Stack Trace:</p> <pre><code>[HttpException (0x80004005): Cannot use a leading .. to exit above the top directory.] System.Web.Util.UrlPath.ReduceVirtualPath(String path) +11495983 System.Web.Util.UrlPath.Reduce(String path) +171 System.Web.VirtualPath.Combine(VirtualPath relativePath) +214 System.Web.VirtualPathUtility.Combine(String basePath, String relativePath) +158 System.Web.Mvc.PathHelpers.GenerateClientUrlInternal(HttpContextBase httpContext, String contentPath) +385 System.Web.Mvc.UrlHelper.GenerateUrl(String routeName, String actionName, String controllerName, RouteValueDictionary routeValues, RouteCollection routeCollection, RequestContext requestContext, Boolean includeImplicitMvcValues) +257 MvcSiteMapProvider.DefaultSiteMapNodeUrlResolver.ResolveUrl(MvcSiteMapNode mvcSiteMapNode, String area, String controller, String action, IDictionary2 routeValues) +1034 MvcSiteMapProvider.MvcSiteMapNode.get_Url() +323 MvcSiteMapProvider.AuthorizeAttributeAclModule.IsAccessibleToUser(IControllerTypeResolver controllerTypeResolver, DefaultSiteMapProvider provider, HttpContext context, SiteMapNode node) +135 MvcSiteMapProvider.DefaultAclModule.IsAccessibleToUser(IControllerTypeResolver controllerTypeResolver, DefaultSiteMapProvider provider, HttpContext context, SiteMapNode node) +216 MvcSiteMapProvider.DefaultSiteMapProvider.IsAccessibleToUser(HttpContext context, SiteMapNode node) +349 MvcSiteMapProvider.Web.Html.MenuHelper.BuildModel(MvcSiteMapHtmlHelper helper, SiteMapNode startingNode, Boolean startingNodeInChildLevel, Boolean showStartingNode, Int32 maxDepth, Boolean drillDownToCurrent) +361 MvcSiteMapProvider.Web.Html.MenuHelper.Menu(MvcSiteMapHtmlHelper helper, String templateName, SiteMapNode startingNode, Boolean startingNodeInChildLevel, Boolean showStartingNode, Int32 maxDepth, Boolean drillDownToCurrent) +87 MvcSiteMapProvider.Web.Html.MenuHelper.Menu(MvcSiteMapHtmlHelper helper, SiteMapNode startingNode, Boolean startingNodeInChildLevel, Boolean showStartingNode, Int32 maxDepth, Boolean drillDownToContent) +40 MvcSiteMapProvider.Web.Html.MenuHelper.Menu(MvcSiteMapHtmlHelper helper, Boolean startFromCurrentNode, Boolean startingNodeInChildLevel, Boolean showStartingNode) +86 ASP._Page_Views_Shared__SfMaster_cshtml.Execute() in c:\webmaster\projects\jclcorp\jclcorpmvc\Views\Shared\_SfMaster.cshtml:22 System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +280 System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +104 System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +173 System.Web.WebPages.WebPageBase.Write(HelperResult result) +89 System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action1 body) +234 System.Web.WebPages.WebPageBase.PopContext() +222 System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +384 System.Web.Mvc.&lt;&gt;cDisplayClass1c.b19() +33 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func1 continuation) +798756 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList1 filters, ActionResult actionResult) +265 System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +798832 System.Web.Mvc.Controller.ExecuteCore() +159 System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +335 System.Web.Mvc.&lt;&gt;cDisplayClassb.b5() +62 System.Web.Mvc.Async.&lt;&gt;cDisplayClass1.b0() +20 System.Web.Mvc.&lt;&gt;cDisplayClasse.bd() +54 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +469 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +375 Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.225 </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload