IO.Directory.Exists always returns true

Posted by roygbiv on Stack Overflow See other posts from Stack Overflow or by roygbiv
Published on 2010-03-19T20:57:16Z Indexed on 2010/03/19 21:01 UTC
Read the original article Hit count: 246

Filed under:
|

I am executing a IO.Directory.Exists on a network share from an ASP.NET application running under a specific Application Pool with a specific user account.

The call always returns true.

I have tried several variations:

  • \\server\share$\directory
  • \\192.168.0.1\share$\directory
  • H:\directory

I have checked that directory and share permissions are available to the account.

The path does have spaces in it \\server\share$\directory\name name\test test, which should make no difference, however I have read otherwise.

I will continue to check permissions, as it does work from my local machine (with the built in VS web-server and I am an administrator on the network), but when deployed to the IIS 6.0 virtual directory, and run under the Application Pool, it does not work.

© Stack Overflow or respective owner

Related posts about .NET

Related posts about system.io.directory