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

  •  02-03-2008, 6:23 AM

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

    Hello,
     
    I have put demo.aspx in /admin folder where only logged in admin has access. But I want to use images stored in folder images which is higher in folder structure, so inside demo.aspx i put FolderPath = "../images".
     
    While loading admin/demo.aspx I get this error: System.Web.HttpException: Cannot use a leading .. to exit above the top directory.
    [HttpException (0x80004005): Cannot use a leading .. to exit above the top directory.]
    System.Web.Util.UrlPath.ReduceVirtualPath(String path) +3626102
    System.Web.Util.UrlPath.Reduce(String path) +84
    System.Web.Util.UrlPath.Combine(String appPath, String basepath, String relative) +326
    System.Web.VirtualPath.Combine(VirtualPath relativePath) +166
    System.Web.HttpRequest.MapPath(VirtualPath virtualPath, VirtualPath baseVirtualDir, Boolean allowCrossAppMapping) +84
    System.Web.HttpServerUtility.MapPath(String path) +106
    DotNetGallery.Gallery.m() +67
    DotNetGallery.Gallery.g() +23

    [FileNotFoundException: The file couldn't be accessed. This may be a security problem.]
    DotNetGallery.Gallery.g() +115
    DotNetGallery.Gallery.q() +859
    DotNetGallery.Gallery.OnPreRender(EventArgs e) +116
    System.Web.UI.Control.PreRenderRecursiveInternal() +86
    System.Web.UI.Control.PreRenderRecursiveInternal() +170
    System.Web.UI.Control.PreRenderRecursiveInternal() +170
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041
     

    How can I use gallery from folder which is not in the same level at folder hierarchy.
     
    Regards,
    Raven
View Complete Thread