简体   繁体   中英

use IIS 7 Manager to set permissions

I followed the steps in here but do not know how to setup permissions, i need to create a directory and unzip a zip file into it and get access denied on the CreateDirectory line:

string zipCurFile = model.ScormPackageFile.FileName;
string destinationDirectoryName = Path.GetFileNameWithoutExtension(zipCurFile);
Directory.CreateDirectory(destinationDirectoryName);

How to add ASP.NET 4.0 as Application Pool on IIS 7, Windows 7

here my IIS 7 manager page 在此处输入图片说明

please help?

You need to give modify permissions for the parent directory to the app pool identity user. This is something that you would do through Windows Explorer and not through IIS Manager.

Right-click the target directory and choose Properties > Security. Edit the permissions for that directory, add the user that your application pool is using and give that user Modify permissions to that folder.

Assuming that you are creating the directory C:\\Files\\ZipTarget\\Scorm and the C:\\Files\\ZipTarget directory already exists, you will need to give the app pool identity user Modify permission to the C:\\Files\\ZipTarget directory.

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