This is a migrated thread and some comments may be shown as answers.

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

2 Answers 229 Views
Button
This is a migrated thread and some comments may be shown as answers.
Tomas
Top achievements
Rank 1
Tomas asked on 04 Feb 2015, 02:26 PM
Hello,

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.


Regards.

2 Answers, 1 is accepted

Sort by
0
Accepted
Danail Vasilev
Telerik team
answered on 09 Feb 2015, 07:57 AM
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.

Regards,
Danail Vasilev
Telerik
 

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.

 
0
Tomas
Top achievements
Rank 1
answered on 11 Feb 2015, 02:10 PM
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.
Tags
Button
Asked by
Tomas
Top achievements
Rank 1
Answers by
Danail Vasilev
Telerik team
Tomas
Top achievements
Rank 1
Share this question
or