Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Cannot use a leading .. to exit above the top directory

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

Scheduled Pinned Locked Moved ASP.NET
helpjavacomdesignsysadmin
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Member 4260270
    wrote on last edited by
    #1

    hello all, i have a problem in source code .i am developing a multilingual website. Here i am using Global resource file for translation .It is working fine in local server but when i upload into online server the following error shows .Below shown bold part a label contains value that dynamically getting from code file .for working online why this value not getting any problem with java script or resource file accessing problem 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: Line 384: mm_menu_0315125553_7.addMenuItem(" <%=lblPrecisionAdvertising.Text%>","location='http://KosmosPrecisionAdsTester.com/HPA\_PresentationLayer\\1\_INTRODUCTION\\701-...the-market-of-1.aspx'"); Line 385: mm_menu_0315125553_7.addMenuItem(" <%=lblMarketOf1.Text%>","location='http://KosmosPrecisionAdsTester.com/HPA\_PresentationLayer\\1\_INTRODUCTION\\701-...the-market-of-1.aspx'"); Line 386: mm_menu_0315125553_7.addMenuItem(" <%=lblUNIQUESystems.Text%>","location='http://KosmosPrecisionAdsTester.com/HPA\_PresentationLayer\\1\_INTRODUCTION\\702K-UniqueSystems.aspx'"); Line 387: mm_menu_0315125553_7.hideOnMouseOut=true; Line 388: mm_menu_0315125553_7.bgColor='#0082AF'; Source File: c:\inetpub\wwwroot\KosmosClub.com\MasterPage.master Line: 386 Stack Trace: [HttpException (0x80004005): Cannot use a leading .. to exit above the top directory.] System.Web.Util.UrlPath.ReduceVirtualPath(String path) +11248521 System.Web.Util.UrlPath.Reduce(String path) +64 System.Web.UI.Control.ResolveClientUrl(String relativeUrl) +212 System.Web.UI.HtmlControls.HtmlLink.RenderAttributes(HtmlTextWriter writer) +85 System.Web.UI.HtmlControls.HtmlLink.Render(HtmlTextWriter writer) +57 ASP.masterpage_master.__Render__control2(HtmlTextWriter __w, Control parameterContainer) in c:\inetpub\wwwroot\KosmosClub.com\MasterPage.master:386 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +115 System.Web.UI.HtmlControls.HtmlHead.RenderChildren(HtmlText

    C T 2 Replies Last reply
    0
    • M Member 4260270

      hello all, i have a problem in source code .i am developing a multilingual website. Here i am using Global resource file for translation .It is working fine in local server but when i upload into online server the following error shows .Below shown bold part a label contains value that dynamically getting from code file .for working online why this value not getting any problem with java script or resource file accessing problem 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: Line 384: mm_menu_0315125553_7.addMenuItem(" <%=lblPrecisionAdvertising.Text%>","location='http://KosmosPrecisionAdsTester.com/HPA\_PresentationLayer\\1\_INTRODUCTION\\701-...the-market-of-1.aspx'"); Line 385: mm_menu_0315125553_7.addMenuItem(" <%=lblMarketOf1.Text%>","location='http://KosmosPrecisionAdsTester.com/HPA\_PresentationLayer\\1\_INTRODUCTION\\701-...the-market-of-1.aspx'"); Line 386: mm_menu_0315125553_7.addMenuItem(" <%=lblUNIQUESystems.Text%>","location='http://KosmosPrecisionAdsTester.com/HPA\_PresentationLayer\\1\_INTRODUCTION\\702K-UniqueSystems.aspx'"); Line 387: mm_menu_0315125553_7.hideOnMouseOut=true; Line 388: mm_menu_0315125553_7.bgColor='#0082AF'; Source File: c:\inetpub\wwwroot\KosmosClub.com\MasterPage.master Line: 386 Stack Trace: [HttpException (0x80004005): Cannot use a leading .. to exit above the top directory.] System.Web.Util.UrlPath.ReduceVirtualPath(String path) +11248521 System.Web.Util.UrlPath.Reduce(String path) +64 System.Web.UI.Control.ResolveClientUrl(String relativeUrl) +212 System.Web.UI.HtmlControls.HtmlLink.RenderAttributes(HtmlTextWriter writer) +85 System.Web.UI.HtmlControls.HtmlLink.Render(HtmlTextWriter writer) +57 ASP.masterpage_master.__Render__control2(HtmlTextWriter __w, Control parameterContainer) in c:\inetpub\wwwroot\KosmosClub.com\MasterPage.master:386 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +115 System.Web.UI.HtmlControls.HtmlHead.RenderChildren(HtmlText

      C Offline
      C Offline
      Covean
      wrote on last edited by
      #2

      I think the name of the configurable aspx website is the problem '701-**...**the-market-of-1.aspx'. The function System.Web.Util.UrlPath.ReduceVirtualPath(String path) tries to reduce the paths '..'-value to the upper directory. Your path is an absolute path. Now the function has the problem to find the upper directory of the full root directory. This directory doesn't exist and thats why it spits this exception.

      Greetings Covean

      1 Reply Last reply
      0
      • M Member 4260270

        hello all, i have a problem in source code .i am developing a multilingual website. Here i am using Global resource file for translation .It is working fine in local server but when i upload into online server the following error shows .Below shown bold part a label contains value that dynamically getting from code file .for working online why this value not getting any problem with java script or resource file accessing problem 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: Line 384: mm_menu_0315125553_7.addMenuItem(" <%=lblPrecisionAdvertising.Text%>","location='http://KosmosPrecisionAdsTester.com/HPA\_PresentationLayer\\1\_INTRODUCTION\\701-...the-market-of-1.aspx'"); Line 385: mm_menu_0315125553_7.addMenuItem(" <%=lblMarketOf1.Text%>","location='http://KosmosPrecisionAdsTester.com/HPA\_PresentationLayer\\1\_INTRODUCTION\\701-...the-market-of-1.aspx'"); Line 386: mm_menu_0315125553_7.addMenuItem(" <%=lblUNIQUESystems.Text%>","location='http://KosmosPrecisionAdsTester.com/HPA\_PresentationLayer\\1\_INTRODUCTION\\702K-UniqueSystems.aspx'"); Line 387: mm_menu_0315125553_7.hideOnMouseOut=true; Line 388: mm_menu_0315125553_7.bgColor='#0082AF'; Source File: c:\inetpub\wwwroot\KosmosClub.com\MasterPage.master Line: 386 Stack Trace: [HttpException (0x80004005): Cannot use a leading .. to exit above the top directory.] System.Web.Util.UrlPath.ReduceVirtualPath(String path) +11248521 System.Web.Util.UrlPath.Reduce(String path) +64 System.Web.UI.Control.ResolveClientUrl(String relativeUrl) +212 System.Web.UI.HtmlControls.HtmlLink.RenderAttributes(HtmlTextWriter writer) +85 System.Web.UI.HtmlControls.HtmlLink.Render(HtmlTextWriter writer) +57 ASP.masterpage_master.__Render__control2(HtmlTextWriter __w, Control parameterContainer) in c:\inetpub\wwwroot\KosmosClub.com\MasterPage.master:386 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +115 System.Web.UI.HtmlControls.HtmlHead.RenderChildren(HtmlText

        T Offline
        T Offline
        T M Gray
        wrote on last edited by
        #3

        The first thing I would suggest is don't mix and match / and \ in URLs. Use / since it is the proper character for URLs and it also has the other benefit of not being an escape character.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups