Mike108
Mike108

Reputation: 2137

How to restart IIS 6 's defaultAppPool using asp.net C#?

How can I restart IIS 6 's defaultAppPool when I click a button of a webform page in an asp.net web app.

I tried to use HttpRuntime.UnloadAppDomain(); but it can not restart the IIS 6 's defaultAppPool.

Upvotes: 3

Views: 1152

Answers (2)

Khurram Aziz
Khurram Aziz

Reputation: 1498

If you need to restart the ASP.NET application; just write some blank lines at the end of web.config; it will automatically restart the ASP.NET application. This technique doesnt require special/administrative permissions!

Upvotes: 0

Related Questions