This article reproduced: http://blog.itpub.net/12639172/viewspace-659819/
As you know, in ASP. NET, if we modify the configuration file as long as it is saved, it will be immediately reflected in the program,
We do not need to restart IIS. We can even replace the files under the application directly without stopping IIS, including our
Compiled DLL files and so on, all you need to do is replace the files you changed. So how does the. NET do it?
This is due to the application domain mechanism of. NET, where the application domain is smaller than the process unit of the program, which means a
The process can contain multiple application domains. Each domain is independent and does not share memory, which means that various static variables
are not shared between different domains.
With the application domain, it's okay, when we change the configuration file or replace a core DLL, the. Net
Monitoring system will report what we have done, the process of processing the ASP will recreate an application domain for the modified application, which
The new domain will react to all changes, and if a request comes in, it will be processed using the new domain, and the original
Domain will be destroyed.
In fact, each application domain does not use the DLL files that we configure in each virtual directory, and for 2.0,3.0,3.5 the real use of the
is a file under the C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP. Net Files directory,
So we can directly replace files such as DLLs.
Why we do not need to restart IIS after the configuration file has been modified in ASP.