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

Cannot use a leading .. to exit above the top directory caused by RadMenu

2 Answers 173 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Accedia
Top achievements
Rank 1
Accedia asked on 19 Sep 2017, 03:53 PM

Hi all,

I encountered a really strange problem. After updating the project to use the latest version of the ASP.NET AJAX controls an error saying "Cannot use a leading .. to exit above the top directory" when a toolbar button is pressed or when an edit form is closing. After some investigation I found out that the issue is being caused by the RadMenu, as when I removed all the buttons, using the Chrome inspector, and clicked the toolbar icon, the application worked as expected.

Otherwise the menu itself is fully functional.

This is the stack trace of the exception if it is going to help:

[HttpException (0x80004005): Cannot use a leading .. to exit above the top directory.] System.Web.Util.UrlPath.ReduceVirtualPath(String path) +12081723 System.Web.Util.UrlPath.Reduce(String path) +60 System.Web.UI.Control.ResolveClientUrl(String relativeUrl) +259 Telerik.Web.UI.RadButton.DescribeClientProperties(IScriptDescriptor descriptor) +2227 Telerik.Web.UI.RadWebControl.DescribeComponent(IScriptDescriptor descriptor) +233 Telerik.Web.UI.RadButton.DescribeComponent(IScriptDescriptor descriptor) +27 Telerik.Web.UI.ScriptRegistrar.GetScriptDescriptors(Control control) +171 Telerik.Web.UI.RadWebControl.GetScriptDescriptors() +9 System.Web.UI.ScriptControlManager.RegisterScriptDescriptors(IScriptControl scriptControl) +166 Telerik.Web.UI.RadWebControl.RegisterScriptDescriptors() +159 Telerik.Web.UI.RadWebControl.Render(HtmlTextWriter writer) +122 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79 Telerik.Web.UI.Menu.Renderers.MenuItemRenderer.RenderTemplateContent(HtmlTextWriter writer, Action`1 action) +288 Telerik.Web.UI.Menu.Renderers.MenuItemRenderer.RenderContents(HtmlTextWriter writer) +171 System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +50 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79 Telerik.Web.UI.Menu.Renderers.MenuItemRendererBase.RenderChildGroup(HtmlTextWriter writer, IList`1 items, String groupCssClass, Action action) +203 Telerik.Web.UI.Menu.Renderers.MenuItemRenderer.RenderColumns(HtmlTextWriter writer, IList`1 itemsToRender, String groupCssClass) +587 Telerik.Web.UI.Menu.Renderers.MenuItemRenderer.RenderContentWrapper(HtmlTextWriter writer, Action`1 action) +77 Telerik.Web.UI.Menu.Renderers.MenuItemRendererBase.RenderContents(HtmlTextWriter writer) +133 System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +50 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79 Telerik.Web.UI.Menu.Renderers.MenuRendererBase.RenderRootGroup(HtmlTextWriter writer, Action`1 action) +263 Telerik.Web.UI.Menu.Renderers.MenuRenderer.RenderContents(HtmlTextWriter writer) +703 System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +50 Telerik.Web.UI.RadDataBoundControl.Render(HtmlTextWriter writer) +94 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +247 System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +47 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +247 System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +47 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +247 System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +131 System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +47 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79 System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +50 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +247 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +247 System.Web.UI.Page.Render(HtmlTextWriter writer) +39 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79 Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) +959 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +114 System.Web.UI.Page.Render(HtmlTextWriter writer) +39 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +8817

Ivan Zhekov
Telerik team
commented on 22 Sep 2017, 10:08 AM

Could you share some of the code that's causing the issue? Usually, this issue is caused by trying to "access" e.g. reference a directory "above" your current root, but we need to see the code to be sure.

Regards,
Ivan Zhekov
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Accedia
Top achievements
Rank 1
commented on 28 Sep 2017, 09:46 AM

Hi Ivan,

I'll try to assemble a sample project and send you a link for it shortly.

Peter Georgiev

HCM
Top achievements
Rank 1
commented on 22 Feb 2024, 01:49 PM

Dears,

 

I m also facing same issue. can you please provide the solution if you have got the solution.

2 Answers, 1 is accepted

Sort by
0
Accedia
Top achievements
Rank 1
answered on 26 Sep 2017, 08:25 AM

Hi,

I created a workaround, by creating a script, that removes all hidden fields, that are connected to the RadMenu, as it is working properly without them and the data, that was contained within was causing the issue. If you want I can try to create a sample project to duplicate the issue, but for now, with this workaround, it is working properly.  

Ivan Zhekov
Telerik team
commented on 27 Sep 2017, 10:25 AM

Hello.

It would be very helpful, if you could create such sample project and attach it in a support thread (you can't attach zip files in forum threads) or upload it somewhere and provide the link to it.

Regards,
Ivan Zhekov
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Attila Antal
Telerik team
answered on 27 Feb 2024, 09:48 AM

Hi,

The error message "Cannot use a leading .. to exit above the top directory" is thrown because the URLs used to point to a File (Pages, CSS, Images, etc.) are incorrect rather than the result of upgrading Telerik. This means using the relative path "../" from the Root directory, which cannot happen as the app cannot serve files outside the app directory.

For more details, please review the ASP.NET Web Site Paths.

Regards,
Attila Antal
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources
Tags
Menu
Asked by
Accedia
Top achievements
Rank 1
Answers by
Accedia
Top achievements
Rank 1
Attila Antal
Telerik team
Share this question
or