当 AppDomain 已加载到 ASP.NET 中时替换 DLL

发布于 2024-11-10 13:48:55 字数 214 浏览 6 评论 0原文

如果 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

臻嫒无言 2024-11-17 13:48:55

一旦修改或添加了 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.

叹沉浮 2024-11-17 13:48:55

来自 MSDN

如果您更改 .dll 并编写新的
将其版本复制到 Bin 文件夹中,
ASP.NET 检测更新并使用
新版本的.dll
从那时起页面请求。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文