W
Wayne Brantley
Using a webservice in asp.net, I make a call to
Directory.CreateDirectory(@"c:\test") and this works fine.
I can create any directory anywhere on my local machine.
Now, I have an iomega NAS on the network. (There is not a domain). This
drive does NOT use permissions and essentially everyone who can access it
can do anything on it. It maps to my computer as drive 'n:'.
If I use that same webservice and call Directory.CreateDirectory(@"n:\test")
it fails with: Could not find a part of the path "n:\"
I have read every article on this twice and tried everything - nothing
works:
1) I tried using _mkdir, just for kicks -
http://hatka.net/wlogdev/archive/2004/08/29/178.aspx
2) <identity impersonate="true"
3) Impersonation in code -
http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q306158#4 (Checking
System.Security.Principal.WindowsIdentidy.GetCurrent().Name before and after
impersonation shows the context changed, but the CreateDirectory fails
anyway.
4) Changing the account aspnet_wp runs under - changed it to system and to
my poweruser account I am using, neither helped.
I wrote a small regular .net application that makes a call to
Directory.CreateDirectory(@"n:\test") and it succeeds, so I know the NAS is
working correctly and it has to be a permissions issue of some kind, but
cannot figure out what.
(Running under XP SP2)
Wayne
Directory.CreateDirectory(@"c:\test") and this works fine.
I can create any directory anywhere on my local machine.
Now, I have an iomega NAS on the network. (There is not a domain). This
drive does NOT use permissions and essentially everyone who can access it
can do anything on it. It maps to my computer as drive 'n:'.
If I use that same webservice and call Directory.CreateDirectory(@"n:\test")
it fails with: Could not find a part of the path "n:\"
I have read every article on this twice and tried everything - nothing
works:
1) I tried using _mkdir, just for kicks -
http://hatka.net/wlogdev/archive/2004/08/29/178.aspx
2) <identity impersonate="true"
3) Impersonation in code -
http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q306158#4 (Checking
System.Security.Principal.WindowsIdentidy.GetCurrent().Name before and after
impersonation shows the context changed, but the CreateDirectory fails
anyway.
4) Changing the account aspnet_wp runs under - changed it to system and to
my poweruser account I am using, neither helped.
I wrote a small regular .net application that makes a call to
Directory.CreateDirectory(@"n:\test") and it succeeds, so I know the NAS is
working correctly and it has to be a permissions issue of some kind, but
cannot figure out what.
(Running under XP SP2)
Wayne