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!

TIP - Accessing Folder Outside the Application Directory

Last post 02-24-2010, 12:44 PM by igor. 1 replies.
Sort Posts: Previous Next
  •  02-24-2010, 11:36 AM 476

    TIP - Accessing Folder Outside the Application Directory


    I'm documenting this because it has caused me an awful lot of grief and to almost abandon using IZWebFileManager - which is a great product.

    I need to use IZWebFile manager on files that are on a differenct drive on my webserver. This is because drive C: has little space for files and drive D: has lots. Later I May need to add drive E:, F: G: etc. - or even another server.

    My application is in the C:\inetpub\wwwroot\myapp\ folder.

    If I create a C:\inetpub\wwwroot\myapp\Files folder and set FileManager1.RootDirectories.Item(0).DirectoryPath = "Files\" the FileManager shows the contents of this directory.

    I assume that is because FileManager1.Directory = "[0]\" is telling it to point to the application folder.

    So I thought that all I needed to do is to set FileManager1.Directory = "D:\Files\".

    However no matter what you set it to other than the default value it will always cause an error. You cannot even get it to point to a folder on the same drive C:

    So the solution is

    1. leave it pointing to a subfolder in the application path.

    2. Create a physical folder "D:\Files\"

    3. Using IIS Manager create a virtual folder under the applcation called "Files"

    4. Set the Physical Path property of this folder to "D:\Files"

    I have done this will Window 2008 R2, IIS 7.5 but suspect it will work with other versions also. I believe that it will also work with UNC paths.

    If you are using shared hosting there is no other choice but to have the files in the application path.

    It would be better if we could just set the FileManager1.Directory property to any valid path.

    Regards .... Mark
  •  02-24-2010, 12:44 PM 477 in reply to 476

    Re: TIP - Accessing Folder Outside the Application Directory

    Thank you for the tip.

    Actually  IZWebFileManager does not support absolute physical path set to DirectoryPath,
    only virtual or application relative path allowed there. That is why FileManager1.Directory = "D:\Files\" does not work.

    Your solution is proper and I hope it will help other users experiences the same problem.

    I will consider such scenario in future enhancement.

    Regards,
    Igor.


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