Restarting (Recycling) an Application Pool
问题 How can I restart(recycle) IIS Application Pool from C# (.net 2)? Appreciate if you post sample code? 回答1: If you're on IIS7 then this will do it if it is stopped. I assume you can adjust for restarting without having to be shown. // Gets the application pool collection from the server. [ModuleServiceMethod(PassThrough = true)] public ArrayList GetApplicationPoolCollection() { // Use an ArrayList to transfer objects to the client. ArrayList arrayOfApplicationBags = new ArrayList();