TheVillageIdiot
TheVillageIdiot

Reputation: 40517

Directory.Exists not getting mapped directory

I have mapped a directory from another machine to my machine as Z: drive. This is further mapped inside a virtual directory on my local IIS7. On one of my pages I am using Server.MapPath("~/dira/mapped_dir") it is giving me correct path like: Z:\\somedir\\mapped_dir. I am able to open this directory and read-write files into it. But when in the ASPX page I execute System.IO.Directory.Exists("Z:\\somedir\\mapped_dir") it returns false.

Does this have anything with permissions or there is some other issue?. The source machine (which contains the physical folder) has given read-write access to all users on the shared folder.

Upvotes: 0

Views: 1301

Answers (1)

Ian
Ian

Reputation: 34509

I know that using the SUBST command for virtual directories is a per-user setting and doesn't work with code running as a different user (e.g. a service). Sounds like it might be similar to your problems...

Upvotes: 4

Related Questions