用程序回收应用程序池失败!估计是权限问题,但是权限已经设置了最高的管理员了,还是不行,图:IIS的匿名访问用户甚至设置成了管理员帐号都不行,站点目录也设置了asp.net、network等用户,一样不行。help!!

解决方案 »

  1.   

    手动回收会失败吗,可能不是权限问题吧
    http://hi.baidu.com/irinihp/blog/item/eaa9dd8b139885799e2fb49a.html
      

  2.   

    不是手动通过IIS管理器回收失败,是使用如下代码:  //调用是这样:
      a("Recycle","asp"); //asp是应用程序池名称
            public static void a(string method, string AppPoolName)
            {
                DirectoryEntry appPool = new DirectoryEntry("IIS://localhost/W3SVC/AppPools");
                DirectoryEntry findPool = appPool.Children.Find(AppPoolName, "IIsApplicationPool");
                findPool.Invoke(method, null);
                appPool.CommitChanges();
                appPool.Close();
            }