use IIS 7 Manager to set permissions

岁酱吖の 提交于 2019-12-25 01:53:49

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/15155385/use-iis-7-manager-to-set-permissions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!