I'm trying to code an application that will be able to see the IIS pools remotely, reset, start and stop each pools separately. I'm using the ServerManager
(assemblyref://Microsoft.Web.Administration) class.
My problem is the pools name I see are different from the inetmgr
grid and there are a different number of them too.
I suppose there must be a lot of things I didn't understand well.
Thanks in advance.
Here is my code:
public static List<string> GetPools(
string serverName)
{
using (ServerManager mgr =
ServerManager.OpenRemote(
serverName))
{
return mgr.ApplicationPools.Select(n => n.Name).ToList();
}
}
![enter image description here][1]