IZWebFileManager

Advanced ASP.NET File Manager
Welcome to IZWebFileManager Sign in | Join | Help
in Search
The forum is moved to http://groups.google.com/group/izwebfilemanager
If you have any question, please post there. Thanks!

Accessing Folders Above the Root Folder

Last post 06-20-2009, 1:19 AM by MarkJ. 0 replies.
Sort Posts: Previous Next
  •  06-20-2009, 1:19 AM 404

    Accessing Folders Above the Root Folder

    If you try to set the Directory path up from the application root folder like this ...

    FileManager1.RootDirectories(0).DirectoryPath = Server.MapPath("../../FilesFolder")

    The following error occurs

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

    However there is a work around by setting the path as follows:

    FileManager1.RootDirectories(0).DirectoryPath = Server.MapPath("") & "..\..\FilesFolder"

    By counting the levels deep the app path is it should be possible to set the root folder to any other folder on the same drive as the application.

    **** Note this does not seem to work in VS2008 Cassini web server - but does work under IIS 6 (haven't tried IIS7)

View as RSS news feed in XML
www.IZWebFileManager.com
izwebfilemanager@gmail.com