Link to home
Start Free TrialLog in
Avatar of edwarlara
edwarlara

asked on

Error reading a map network drive folder (ASP.NET)

I am trying to read a folder located in a map network drive from my web server and I am receiving the following error:
Could not find a part of the path 'T:\CustomJersey\T-BYTE\3742\ViewFinalArt'.

This is part of the software that I am using to read the folder:
Dim Folder As String = "T:\CustomJersey\T-BYTE\3742\ViewFinalArt"
Dim DirInfo As New DirectoryInfo(Folder)
Dim Files As FileInfo() = DirInfo.GetFiles()

Any Ideas?
Thanks
Avatar of Christopher Kile
Christopher Kile
Flag of United States of America image

You need to set your web server security policy to allow access to files not on the web server.  Try setting up a virtual directory that points to T:.
Avatar of edwarlara
edwarlara

ASKER

Thanks for your help.
I am trying to create the Virtual Directory in IIS 6.0 but in the Virtual Directory Creation Wizard, after I typed the alias for the virtual directory and click next to browse for the folder, the "OK" button is grayout (The local drive are fine, but as soon as I click in any map network drive the "OK" button is disable).
Are there any rigths that I need to set to the map network drive to be able to create the virtual directory?

Thanks

Here are the steps that I am doing to create the virtual directory:
1. Click Start, point to Programs, click to select Administrative Tools, and then click Internet Services Manager.
2. Expand the server name.
3. In the left pane, right-click Default Web Site, point to New, and then click Virtual Directory.
4. In the first screen of the Virtual Directory Creation Wizard, type an alias, or name, for the virtual directory, and then click Next.
5. In the second screen, click Browse. Locate the content folder that you created to hold the content. Click Next.  (Here is where the "OK" button is greyout)
ASKER CERTIFIED SOLUTION
Avatar of Christopher Kile
Christopher Kile
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
cpkilekofp:
I am sorry it took me a while to response. All your information was very helpful to fix this problem. At the end we created a virtual directory to open some pdf files from the remote server.

Thank you