Replacing a DLL while AppDomain is already loaded in ASP.NET
What happens if a dll is already loaded by w3wp.exe
and we replace it?
Of course we can replace a dll since asp.net uses a cached version of Bin
folder DLLs, but I want to know if upon replacing a dll it will load the new one or it wait until next recycling or when开发者_如何转开发 there's no new request.
EDIT: DLL contains a singleton class
Your application will be compiled again once a dll is modified or added.
Your application's domain will be recycled when any change occurs in the bin directory or if its contents are modified.
From MSDN:
If you change the .dll and write a new version of it to the
Bin
folder, ASP.NET detects the update and uses the new version of the .dll for new page requests from then on.
精彩评论