Solved

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

Posted on 2007-04-09
4
2,546 Views
Last Modified: 2012-08-14
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
0
Comment
Question by:edwarlara
  • 2
  • 2
4 Comments
 
LVL 23

Expert Comment

by:Christopher Kile
ID: 18876765
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:.
0
 

Author Comment

by:edwarlara
ID: 18877893
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)
0
 
LVL 23

Accepted Solution

by:
Christopher Kile earned 500 total points
ID: 18878673
Hmmmm...I goofed in my original post, as I know a better solution but it did not come immediately to mind.

Instead of creating the virtual directory, go to the web application directory, right-click it, select Properties, click on the Directory Security tab, then click the button in the Anonymous access and authentication control frame.  The Account used for anonymous access must be a network account with the rights your application requires (we've used a single account for multiple web apps).  You can experiment with your own account if it has the necessary access, but you should set up an "application user" only used for anonymous access on an ongoing basis.
0
 

Author Comment

by:edwarlara
ID: 18917923
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
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Code works but how can I download the file? 20 67
Host asp.net pages 5 25
Connection String 16 43
Executing SSIS with a Stored Procedure Permissions 12 26
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now