开发者

Replacing a DLL while AppDomain is already loaded in ASP.NET

开发者 https://www.devze.com 2023-03-09 03:38 出处:网络
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 dl

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消