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

3 posts, 1 answers
  1. Tomas
    Tomas avatar
    3 posts
    Member since:
    May 2013

    Posted 04 Feb 2015 Link to this post


    we've recently fell into serious trouble regarding RadButton (and maybe some other component).

    Few days ago, we updated from 2014.1.403.45 to some more recent version and started to face some exception.

    Details from call stack are here:
    System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Web.HttpException (0x80004005): Cannot use a leading .. to exit above the top directory. at System.Web.Util.UrlPath.ReduceVirtualPath(String path) at System.Web.Util.UrlPath.Reduce(String path) at System.Web.Util.UrlPath.Combine(String appPath, String basepath, String relative) at System.Web.UI.Control.ResolveClientUrl(String relativeUrl) at Telerik.Web.UI.RadButton.DescribeClientProperties(IScriptDescriptor descriptor)

    The page where the problem happens is quite complex so it is quite hard to extract the problem. Shortly, the hierarchy is as following: master page -> page -> ajax panel -> tabstrip -> page view -> button.

    As an ajax gets submitted (i.e. ajax panel is sending request), the POST data is very different from previously used version, it may be the source of the problem. I attached the data being sent before an update and after it. Hope that can help you. 

    We also did some analysis and found following difference. We created custom class inherited from RadButton, overrided affected method DescribeClientProperties, inside put the base method call into try-catch block. In situation when the exception is being raised the NavigateUrl property is different than in previous version as following: previous = ~/TicketMessage/Create/35, current = ../../../TicketMessage/Create/35. When the method DescribeClientProperties gets called with the latter value, an exception is raised.

    I also must mention that we incorporate in project Web Forms 4.5.1 with routing enabled - as you can see from sampled url.

    Hope that someone can give us some guide. Googling the net did not help us, unfortunately.

  2. Answer
    Danail Vasilev
    Danail Vasilev avatar
    1502 posts

    Posted 09 Feb 2015 Link to this post

    Hello Tomas,

    Generally such an error indicates that the web page is trying to reach a folder that is level up than the web site's one. I can suggest that you ensure the button is navigating to the correct page. More information is available in this and this forum posts.

    If the above information, however, doesn't help we will need a small runnable sample to make a further investigation on the matter.

    Danail Vasilev

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. Tomas
    Tomas avatar
    3 posts
    Member since:
    May 2013

    Posted 11 Feb 2015 in reply to Danail Vasilev Link to this post

    Okay, we finally got the point. The source of the problem was routing in Web Forms. There is crucial difference between address like "/Ticket/35" and "/Ticket/35/". Sometimes the last slash is appended (e.g. in case of empty optional route parameter) and in that case .NET treat it as another indent.
Back to Top