Reputation: 6353
I want to know how many ISAPI filters are active on IIS. And I also want to read the metadata properties of these active ISAPI filters in C#.
I have created an ISAPI filter dll and added it to IIS. I can see that filter in "inetmgr" but I want to get the same information through C#. Is that possible?
Upvotes: 2
Views: 560
Reputation: 6765
You can use ADSI
The path is "IIS://LocalHost/W3SVC/Filters"
http://msdn.microsoft.com/en-us/library/ms525344(VS.90).aspx
And you can get access to that in c# using DirectoryEntry 's
http://support.microsoft.com/kb/315716
DirectoryEntry de = new DirectoryEntry("IIS://LocalHost/W3SVC/Filters");
foreach (DirectoryEntry child in de.Children) {
child.Name
child.Properties["SomeProperty"].Value
}
Upvotes: 2