简体   繁体   中英

How to grant rights properly to a folder on IIS 7.5 Express

I'm getting a quite common exception: Access to the path 'C:\\inetpub\\wwwroot\\Content\\Images\\Uploads\\<there goes my hashed guid as a subfolder name which is created dynamically>'

I'm using IIS Express 7.5 . I'm using WA authentication in my application. Impersonation's disabled both in web.config and on IIS .

I looked at application pool the site is running (which is ASP.NET 4.0 ). Application pool identity: Network Service . I have given full control rights to the Uploads folder for IIS AppPool\\ASP.NET 4.0 . Also did this for authenticated users . Checked I did this for subfolders.

EDIT

Helped a little http://forums.asp.net/t/984207.aspx/1

I have created the folder: C:\\inetpub\\wwwroot\\Content\\Images\\Uploads . It wasn't present on my C drive before). Then I added full control permissions for Network Authority on the folder and successfully uploaded a file to the path.

So I'm just curious where should I keep my project folder? Now I keeping it on other drive, not C .

EDIT

Ok. I understood. All this is connected to my code where Server.MapPath is called.

Thanks!

您必须授予对NetworkServiceUploads文件夹的权限,否则它是ASP.NET 4.0身份。

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