简体   繁体   中英

IIS 7.5 Directory Access Denied When File.Copy

When i try to copy files with System.IO.File.Copy() with ASP.Net C# in IIS 7.5 i get directory access denied error.

I've added almost every possible users that could need a permission on that folder :

IIS APPPOOL.Net v4.5 Classic

IUSR

IIS_IUSRS

Didn't work. I've then added same permissions to the parent folder , but i still can't make it work.

PS : I don't use the inetpub directory for this application. It doesn't even located in the system partition (eg C:\\) . Its in somewhere else and its sync with Google Drive. But i can travel through files with these permissions.

So what do you all think it could be ?

  1. Use FileMon to identify the exact account that is trying to copy the files and getting the access denied error.
  2. once you identify the account, give necessary permissions to it, instead of giving access to random accounts which could result in security issues.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM