Mike108
Mike108

Reputation: 2147

How to restart the w3wp.exe process using asp.net C#?

How to restart the w3wp.exe process using asp.net C#? For example, I want to click a button in a webform page to restart the w3wp.exe process in the server.

Upvotes: 2

Views: 4358

Answers (1)

Joel Cunningham
Joel Cunningham

Reputation: 13740

You can force an application recycle by running the following code.

HttpRuntime.UnloadAppDomain()

Hope this helps.

Upvotes: 2

Related Questions