Skip to main content

Application domain restart

There are several conditions that will cause an application domain to shut down and restart.

When ASP.NET must restart an AppDomain, it simply removes the entry in the table that points to the AppDomain. When a new request arrives, the table does not have an entry; therefore, ASP.NET creates a new AppDomain that handles all of the future requests. The old AppDomain continues running until it completes all of its current requests. Finally, the old AppDomain shuts down.

The following changes will cause an AppDomain to restart:
  1. Configuration change—If the machine.config or Web.config files are changed, ASP.NET detects the change and restarts the affected AppDomain.
  2. Global.asax change—If the global.asax file is changed, ASP.NET detects the change and restarts the affected AppDomain.
  3. Bin directory change—If an assembly in the bin directory is changed, ASP.NET restarts the AppDomain that corresponds to that bin directory.
  4. Compilation count change—When an ASP.NET Web page is changed, it is recompiled. You can set a compilation element in the Web.config file that specifies how many times a Web page can be recompiled before ASP.NET restarts the AppDomain. Each Web page recompile degrades an application domain’s performance; establishing a recompiling limit therefore helps control the overall performance of the Web application.
DebugGuru

Comments

Popular posts from this blog

Why there is semicolon at the start of a JavaScript function?

Very often while reviewing the code for my team, I will come across a semicolon at the start of JavaScript function as show below ; (function () { 'use strict'; ...and I often wondered what purpose it served. Guess what. It is an insurance to make sure your script works fine when all other scripts are merged together;  The leading ; in front of immediately-invoked function expressions (iffe) is there to prevent errors when appending the file during concatenation to a file containing an expression not properly terminated with a ;. So there you go. Now you know what that little semicolon is doing there in your code.

What is Event Sourcing?

If you scratching your head and wondering what is Event Sourcing, this is a very good article to start. https://www.erikheemskerk.nl/event-sourcing-awesome-powerful-different/ I couldn't have explained it any better.