I have a virtual directory name. For this virtual directory i have to find out the application pool associated. Once i get the application pool i have to find out all the vi
using (var serverManager = new ServerManager())
{
var apps = (from site in serverManager.Sites
from app in site.Applications
where app.ApplicationPoolName.Equals("DefaultAppPool")
select app);
}