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. General Programming
  3. C#
  4. I got this error on page load my photo gallery page . http://s.codeproject.com/script/Forums/Images/smiley_WTF.gif

I got this error on page load my photo gallery page . http://s.codeproject.com/script/Forums/Images/smiley_WTF.gif

Scheduled Pinned Locked Moved C#
comdesigndata-structuresdebuggingtools
2 Posts 2 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.
  • 3 Offline
    3 Offline
    300sparta
    wrote on last edited by
    #1

    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) +12705512 System.Web.Util.UrlPath.Reduce(String path) +169 System.Web.UI.Control.ResolveClientUrl(String relativeUrl) +314 System.Web.UI.HtmlControls.HtmlLink.RenderAttributes(HtmlTextWriter writer) +172 System.Web.UI.HtmlControls.HtmlLink.Render(HtmlTextWriter writer) +67 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +150 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +249 System.Web.UI.HtmlControls.HtmlHead.RenderChildren(HtmlTextWriter writer) +28 System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +49 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +150 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +249 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +150 System.Web.UI.Control.RenderChildrenInternal(HtmlTex :wtf: :wtf: :wtf: :wtf: :wtf: :wtf: :wtf: :wtf: :wtf: :wtf: :wtf: tWriter writer, ICollection children) +249 System.Web.UI.Page.Render(HtmlTextWriter writer) +40 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +150 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5363

    OriginalGriffO 1 Reply Last reply
    0
    • 3 300sparta

      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) +12705512 System.Web.Util.UrlPath.Reduce(String path) +169 System.Web.UI.Control.ResolveClientUrl(String relativeUrl) +314 System.Web.UI.HtmlControls.HtmlLink.RenderAttributes(HtmlTextWriter writer) +172 System.Web.UI.HtmlControls.HtmlLink.Render(HtmlTextWriter writer) +67 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +150 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +249 System.Web.UI.HtmlControls.HtmlHead.RenderChildren(HtmlTextWriter writer) +28 System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +49 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +150 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +249 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +150 System.Web.UI.Control.RenderChildrenInternal(HtmlTex :wtf: :wtf: :wtf: :wtf: :wtf: :wtf: :wtf: :wtf: :wtf: :wtf: :wtf: tWriter writer, ICollection children) +249 System.Web.UI.Page.Render(HtmlTextWriter writer) +40 System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +150 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5363

      OriginalGriffO Offline
      OriginalGriffO Offline
      OriginalGriff
      wrote on last edited by
      #2

      Without your code? We are guessing... But teh error is pretty explicit: you are trying to refer to a file directly using a relative path:

      ..\folder\file.jpg

      But the current folder is already at the root of the drive (or root of the website for a web app) Try using an absolute path, or check your current folder is where you think it is!

      Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)

      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
      "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

      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