Recycle Application Pool
Thanks
public static void RecycleAppPool()
{
try
{
string path = "IIS://webservername" + "/W3SVC/AppPools/AppPoolName";
DirectoryEntry w3svc = new DirectoryEntry(path);
w3svc.Invoke("Recycle", null);
}
catch (Exception ex)
{
System.Diagnostics.Debug.Print(ex.Message);
}
}

