0

I know this has come up in other questions, but none seem as simple:

I have a UNC share on another machine, with security set to Full Control for Everyone. If I log into my web server, I can access this share.

However when I try to access it using Directory.GetFiles(path) in the ASP.NET code, it returns an Access to the path \\xxxx is denied. error.

Also oddly, when I run the same website from my local visual studio web server, but pointing at the same path, the directory can be accessed fine.

What am i missing here?!

Paul Grimshaw
  • 19,894
  • 6
  • 40
  • 59

1 Answers1

0

Add IUSR, IIS_IUSRS as suggested by Carlos487 and Network Service as well with full control on the directory that you are trying to access with your application. Hope this helps.

Dare Devs
  • 156
  • 1
  • 4
  • 13
  • "Everyone" includes the accounts you've listed. Anyhow, tried explicitly adding and didn't help... – Paul Grimshaw Jul 09 '14 at 21:01
  • Check the filesystem permissions on the folder that's being shared out. Granting `Full Control` to `Everyone` on the **share** is not sufficient by itself - the filesystem ACLs on the folder being shared must also allow access to the web server user. – nobody Jul 09 '14 at 21:34