2

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.

1 Answer 1

2

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

HttpRuntime.UnloadAppDomain()

Hope this helps.

Sign up to request clarification or add additional context in comments.

2 Comments

ASP.NET harakiri? What happens to the request that results in the UnloadAppDmain method call? What is returned to the browser? The worker process will only be recycled when IIS receives another request...
Joel Cunningham, Thank you for your help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.