Sandy
Sandy

Reputation: 6353

IIS: DirectoryEntry Exception: "access denied"?

When I am creating the DirectoryEntry as:

string path = string.Concat("IIS://", serverName, "/W3SVC/1/Filters");
DirectoryEntry de = new DirectoryEntry(path);

I am getting the exception : "Access Denied". I am using WPF windows application.

Upvotes: 2

Views: 860

Answers (1)

Darin Dimitrov
Darin Dimitrov

Reputation: 1039408

You need to run this application under an account that has administrative privileges to the server you are creating virtual directories.

Upvotes: 2

Related Questions