charlie_cat
charlie_cat

Reputation: 1850

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 enter image description here

please help?

Upvotes: 0

Views: 1382

Answers (1)

levelnis
levelnis

Reputation: 7705

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.

Upvotes: 1

Related Questions