Solved

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

Posted on 2007-04-09
4
2,542 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

743 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

18 Experts available now in Live!

Get 1:1 Help Now