Directory.Exists() with UNC Network Paths

G

Guest

On an ASP.NET page I try to access a network shared directory using the
following code:

System.IO.DirectoryInfo dirInfo = new
System.IO.DirectoryInfo(@"\\server\share");
if (dirInfo.Exists)
Response.Write ("Passed");
else
Response.Write ("Failed");

The result is it always goes to "Failed"

I have granted full permissions first to "Authenticated Users" and then to
"Everyone" for both the share permissions and the ACLs on the folder.

Thanks,
Steve
 

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

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,709
Latest member
AustinMudi

Latest Threads

Top