I got this error on page load my photo gallery page . http://s.codeproject.com/script/Forums/Images/smiley_WTF.gif
-
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
-
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
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 – ∞)