network drive problem w/ System.IO.Directory.Exists

  • Thread starter Thread starter Peter O'Reilly
  • Start date Start date
P

Peter O'Reilly

While using the .Net framework v 1.1 implementation of
System.IO.Directory.Exists(), it fails to recognize a mapped network drive.

This is true if the path specified uses a mapped drive letter or is
expressed as a UNC address. I have also tried the drive letter and UNC
paths with and without trailing backslashes, respectively. No luck.

I would suspect it is a security concern, but no exception is returned. For
all combinations, System.IO.Directory.Exists returns false.

I've double checked my typing of the path address and validated that
Directory.Exists() does work predictably well for local paths, e.g. c:\winnt
(and also discovered remote paths are not an issue with classic VBA).

Any help is appreciated. Thanks!
 
I neglected to mention that it is the ASP.NET worker process that is
accessing the network drive.

I found the answer in the following knowledge base article:
307901: INFO: Permissions to Connect to a Remote Access Database from
ASP.NET
http://support.microsoft.com/default.aspx?scid=kb;en-us;307901&Product=aspnet

That said, the original behavior I experienced is inconsistent and should be
considered a bug. A security exception should have been thrown.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top