Pages

Saturday, 20 April 2013

How to restart an IIS Worker Process programmatically (i.e. shutdown the current ASP.NET Domain)

There are cases in TeamMentor’s live sites where we need to do a soft ‘reboot’ to the live website.

Although there is no public Asp.NET method to do that, a quick call (using reflection) to the HttpRuntime.ShutdownAppDomain (private static) method, will do the trick.

In TeamMentor, this provided via the Admin_Restart() method

image

which is a REST call:

image