Recycle Application Pool

Hi, I have the below function in ASP.NET 2.0 to recycle the application pool. Now, i need it to run under ASP.NET 1.1, but i couldn't make it works. The error message only says "Access Denied". Can anyone tell me why?

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);
}

}
[730 byte] By [yolip] at [2007-11-20 11:26:17]