0

Just like disabling windows service, is there a way to disable app pool in IIS? This is just to prevent apppool restarting on server restart.

Camilo Terevinto
  • 31,141
  • 6
  • 88
  • 120
Nikhil Agrawal
  • 47,018
  • 22
  • 121
  • 208

2 Answers2

0

In IIS Manager there is the "Start Automatically" setting in the (General) area in Advanced Settings.

Also see How to config application pool in IIS 7.5 automatically re-start when it was stopped? for an alternative way to do the same thing.

AUSteve
  • 3,238
  • 21
  • 36
0

This C# example works for me

string appPoolPath = "IIS://localhost/W3SVC/AppPools/myapppool";
            var appPool = new DirectoryEntry(appPoolPath);
            appPool.Invoke("Start", null);
            appPool.Invoke("Stop", null);
            appPool.Invoke("Recycle", null);`