Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8215389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:46:16+00:00 2026-06-07T11:46:16+00:00

I read Phil Haack’s article on using the IRegisteredObject interface to be sure that

  • 0

I read Phil Haack’s article on using the IRegisteredObject interface to be sure that a background thread finishes completion when the AppDomain is brought down, and I implemented it into my code. However, I’m not entirely sure how to simulate a AppDomain crash in order to test it. How can I simulate an AppDomain crash?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T11:46:18+00:00Added an answer on June 7, 2026 at 11:46 am

    Easiest way to get an AppDomain to shutdown is by causing the parent process to stop. In ASP.NET you can do this by recycling or stopping the application pool that your code is running under. We have some code that does that to make sure logging gets flushed and that’s how I’ve tested it in the past.

    As for a complete crash, I’m not really sure how you could go about that… The hosting environment catches exceptions so it might not be doable. You could try Environment.Exit or Environment.FailFast which will force the parent process to exit immediately?

    Edit:
    I forgot the easiest option here… Just save Web.config – this will trigger an AppDomain recycle!

    Some alternates…

    If you’re running using IIS you can recycle the application pool starting IIS Manager and following these steps…

    1. Locate your application beneath ‘Sites’. It maybe beneath one of the websites in there – possibly as a virtual directory.
    2. Right-click the application and select ‘Manage Application’ then ‘Advanced Settings’.
    3. Make a note of the ‘Application Pool’.
    4. Locate the application pool beneath ‘Application Pools’.
    5. Right-click it and hit recycle.

    For IIS Express you can simply right-click the icon in the tray and in the UI you should be able to stop the application there.

    For Visual Studio Development Server (Cassini) you can also use the tray to stop the application.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is hopefully a one liner. I've read Phil Haack's article http://haacked.com/archive/2008/10/23/model-binding-to-a-list.aspx and other
I've read Phil Haack's post on custom client-side validation in ASP.NET MVC 2. I
I read in a jbpm forum article https://community.jboss.org/thread/165545 describing the HumanTaskHandler as Asynchronous workitem
I've read Phil's article ( http://haacked.com/archive/2010/04/15/sending-json-to-an-asp-net-mvc-action-method-argument.aspx ) and still can't figure out how I
Read in some blog that GC in Android happens on main(UI) thread, this may
I read an article about a regular expression to detect base64 but when I
I read somewhere that md5 is not 100% secure. Hence, the question.
Read that the following code is an example of unsafe construction as it allows
Read some other things on here re: this similar problem but am not sure
I read somewhere that Apple encourages the use of NSURL over NSString in terms

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.