Archive

Posts Tagged ‘Application Pools’

.NET C#: Recycle current Application Pool programmatically (for IIS 6+)

February 12th, 2008 leandrodg 6 comments 4,721 views

I’ve been working on how to recycle the current application pool for my ASP .NET application.

There are 3 steps for doing this:

  1. Verify if application is running on IIS that supports application pools (if not, there’s nothing to recycle).
  2. Get application pool name (obtained from the DirectoryServices entry corresponding to our virtual directory).
  3. Invoke Recycle method in the DirectoryServices entry corresponding to the application pool.

Read more…