+1-888-365-2779
Try Now
More in this section

Forums / 3.x Pre-release forums (retired) / Cannot use a leading .. to exit above the top directory.

Cannot use a leading .. to exit above the top directory.

3 posts, 0 answered
  1. fregas baratis
    fregas baratis avatar
    185 posts
    Registered:
    14 Nov 2002
    23 Feb 2007
    Link to this post
    I suddenly started seeing this error on all pages that are not directly in the root (child pages.)

    Server Error in '/' Application.

    Cannot use a leading .. to exit above the top directory.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Web.HttpException: Cannot use a leading .. to exit above the top directory.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [HttpException (0x80004005): Cannot use a leading .. to exit above the top directory.]
    System.Web.Util.UrlPath.ReduceVirtualPath(String path) +3536158
    System.Web.Util.UrlPath.Reduce(String path) +84
    System.Web.Util.UrlPath.Combine(String appPath, String basepath, String relative) +355
    System.Web.UI.Control.ResolveClientUrl(String relativeUrl) +196
    System.Web.UI.WebControls.Image.AddAttributesToRender(HtmlTextWriter writer) +62
    System.Web.UI.WebControls.WebControl.RenderBeginTag(HtmlTextWriter writer) +17
    System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +17
    System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
    System.Web.UI.WebControls.HyperLink.RenderContents(HtmlTextWriter writer) +148
    System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +29
    System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
    System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +130
    System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +24
    System.Web.UI.Control.Render(HtmlTextWriter writer) +7
    System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
    System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +130
    System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +24
    System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +59
    System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +68
    System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
    System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +37
    System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +130
    System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +24
    System.Web.UI.Control.Render(HtmlTextWriter writer) +7
    System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
    System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +130
    System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +24
    System.Web.UI.Page.Render(HtmlTextWriter writer) +26
    Telerik.Cms.Web.CmsPageBase.Render(HtmlTextWriter writer) +70
    System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1896


    Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210
  2. Robert hinojosa
    Robert hinojosa avatar
    8 posts
    Registered:
    20 Aug 2005
    24 Feb 2007
    Link to this post
    Hey Craig,

    This happened to me as well.  It turned out to be a RadMenu control that was indeed trying to go up one directory after I took it out from working inside of a virtual directory.

    There's also a post in the initial beta forums that says there was a problem with the SiteMapDataSource.
    http://www.sitefinity.com/support/forums/support-forum-thread/b1043S-gbahc.aspx

    Don't know if that was fixed or not.
  3. Bob
    Bob avatar
    330 posts
    Registered:
    24 Sep 2012
    26 Feb 2007
    Link to this post
    Hi Craig & Robert,

    It seems form the stack trace that there is an image control on the page that’s URL was set with leading “../”. URLs that are resolved on the server should always be set with “~/”. This is limitation of Sitefinity and could not be fixed. This is because the requested URLs are always rewritten and the execution is always performed from the root folder of the application.

    Greetings,
    Bob
    the telerik team
Register for webinar
3 posts, 0 answered