how to get the application pool name for a specific website IIS 6 programmatic using C#
EDIT: I already used the methods of DirectoryServices namespace but the appl
In brief, there's 2 ways of doing this that spring to mind.
The less sophisticated way is knowing that, IIS6's settings are stored in the MetaBase which is just an Xml file:
C:\WINDOWS\system32\inetsrv\MetaBase.xml
You can just use Linq2Xml and parse the Xml looking for the sites name or Id, The AppPoolId attribute contains the name of the AppPool
The proper way is to use System.DirectoryServices