hi,

my website was working fine, then I have added this code in my master page:

Dim css As New HtmlLink
        css.Href = ResolveClientUrl("~/JS/jquery_ui_1.8.1.4/jquery-ui-1.8.14.custom.css")
        css.Attributes("rel") = "stylesheet"
        css.Attributes("type") = "text/css"
        css.Attributes("media") = "all"
        Page.Header.Controls.Add(css)


        Dim jquery_ui_core_min As New HtmlGenericControl("script")
        jquery_ui_core_min.Attributes.Add("type", "text/javascript")
        jquery_ui_core_min.Attributes.Add("src", ResolveClientUrl("~/JS/jquery_ui_1.8.1.4/jquery.ui.core.min.js"))
        Me.Page.Header.Controls.Add(jquery_ui_core_min)


        Dim jquery_ui_widget_min As New HtmlGenericControl("script")
        jquery_ui_widget_min.Attributes.Add("type", "text/javascript")
        jquery_ui_widget_min.Attributes.Add("src", ResolveClientUrl("~/JS/jquery_ui_1.8.1.4/jquery.ui.widget.min.js"))
        Me.Page.Header.Controls.Add(jquery_ui_widget_min)

        Dim jquery_ui_datepicker_min As New HtmlGenericControl("script")
        jquery_ui_datepicker_min.Attributes.Add("type", "text/javascript")
        jquery_ui_datepicker_min.Attributes.Add("src", ResolveClientUrl("~/JS/jquery_ui_1.8.1.4/jquery.ui.datepicker.min.js"))
        Me.Page.Header.Controls.Add(jquery_ui_datepicker_min)

so I got this error in one of aspx pages related to this master page:

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) +8862087
System.Web.Util.UrlPath.Reduce(String path) +52
System.Web.Util.UrlPath.Combine(String appPath, String basepath, String relative) +214
System.Web.UI.Control.ResolveClientUrl(String relativeUrl) +180
System.Web.UI.HtmlControls.HtmlLink.RenderAttributes(HtmlTextWriter writer) +74
System.Web.UI.HtmlControls.HtmlLink.Render(HtmlTextWriter writer) +42
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
System.Web.UI.HtmlControls.HtmlHead.RenderChildren(HtmlTextWriter writer) +17
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
System.Web.UI.Control.Render(HtmlTextWriter writer) +10
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
System.Web.UI.Page.Render(HtmlTextWriter writer) +29
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1266


Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927

then I thought the problem because of "~/" so I have changed it to "../" but still I got same problem, even I have removed the above code and I have inserted in my master page header this line:

<link href="../../../JS/jquery_ui_1.8.1.4/jquery-ui-1.8.14.custom.css" rel="stylesheet" type="text/css" />

but still I got same error in nested level 1 and 2 !!!

note:

level 0: master page, login page
level 1: default page
level 2:pages such as 'Configuration.aspx', 'History.aspx', .....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.