.NET C#: Recycle current Application Pool programmatically (for IIS 6+)
I’ve been working on how to recycle the current application pool for my ASP .NET application.
There are 3 steps for doing this:
- Verify if application is running on IIS that supports application pools (if not, there’s nothing to recycle).
- Get application pool name (obtained from the DirectoryServices entry corresponding to our virtual directory).
- Invoke Recycle method in the DirectoryServices entry corresponding to the application pool.
Recent Comments