Restarting (Recycling) an Application Pool

John picture John · Oct 30, 2008 · Viewed 98.5k times · Source

How can I restart(recycle) IIS Application Pool from C# (.net 2)?

Appreciate if you post sample code?

Answer

Nathan Ridley picture Nathan Ridley · Jul 4, 2009

Here we go:

HttpRuntime.UnloadAppDomain();