当 AppDomain 已加载到 ASP.NET 中时替换 DLL
如果 w3wp.exe
已经加载了 dll 并且我们替换了它,会发生什么情况?
当然,我们可以替换 dll,因为 asp.net 使用 Bin
文件夹 DLL 的缓存版本,但我想知道在替换 dll 后是否会加载新的 dll,或者等到下一次回收或当没有新的请求时。
编辑: DLL 包含一个单例类
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
一旦修改或添加了 dll,您的应用程序将被重新编译。
您的 当 bin 目录发生任何变化或者其内容被修改时,应用程序的域将被回收。
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.
来自 MSDN:
From MSDN: