Asp.net 将 DLL 重新安装到 GAC 中

发布于 2024-07-04 12:48:18 字数 263 浏览 4 评论 0原文

我正在尝试在 GAC 中重新安装 DLL,一切似乎都工作正常,但访问它的 Web 应用程序似乎仍在使用旧的。

旧的 DLL 与新的 DLL 版本相同,仅进行了较小的编辑,它将被 50 个不同的站点使用,因此更改版本然后更改 web.config 中的引用并不是一个好的解决方案。

重新启动 IIS 服务器或工作进程不是一个选项,因为已经有 50 个站点正在运行,必须继续这样做。

有谁知道我做错了什么或者我可以做些什么来纠正这种情况?

I'm trying to re-install a DLL in the GAC, everything seems to work fine but the web application accessing it still seems to be using the old one.

The old DLL is the same version as the new one with only a minor edit, it will be used by 50 different sites so changing the version then changing the reference in the web.config is not a good solution.

Restarting the IIS server or the worker process isn't an option as there are already 50 sites running that must continue to do so.

does anyone know what i'm doing wrong or what i can do to remedy this situation?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

爱,才寂寞 2024-07-11 12:48:18

由于您没有引用应用程序池,因此我假设您使用的是旧版本的 IIS。 在这种情况下,您需要做的是“接触”每个站点中引用该 DLL 的所有 DLL。

问题是代码已经加载,您需要找到一种非侵入性的方式来重新加载应用程序。 回收应用程序池是实现此目的的有效方法。 如果您使用的是没有应用程序池的旧 IIS,则更新 /bin/ 文件夹或 web.config 文件中的最后修改内容将重新加载应用程序,而不会影响其他站点。

因此,执行上述操作的某种脚本是合适的。 它所需要做的就是更新每个 /bin 应用程序目录中 DLL 的最后修改时间。

Since you don't make a reference to application pools, I'm going to assume you are on the old version of IIS. In that case, what you'll need to do is to "touch" all the DLLs in each site that references the DLL.

The problem is that the code is already loaded and you need to find a non-intrusive way to re-load the application. Recycling app-pools is an effective way to do this. If you are on the old IIS that doesn't have app-pools, then updating the last-modified in the /bin/ folders or web.config files will reload the application without affecting the other sites.

So a script of some kind to do the above is in order. All it needs to do is update the lastmodified on the DLLs in every /bin application directory.

泪冰清 2024-07-11 12:48:18

AFAIK,您需要重新启动 IIS 才能获得对更新的 DLL 的新引用。 最好的办法是在流量较低的时间执行重置。 如果您正在运行具有负载平衡功能的多台服务器,则可以防止新连接到达一台服务器,直到所有连接都已关闭。 然后,更新 DLL,重新启动 IIS,并将服务器带回到连接池中。 对每台服务器重复此操作,最终用户不会看到停机时间。

AFAIK, you need to restart IIS for it to get a fresh reference to the updated DLL. Your best bet is to perform the reset at a low traffic time. If you are running multiple servers with load balancing, you can prevent new connections from hitting one server until all connections have been closed. Afterwards, update the DLL, restart IIS, and bring the server back into the connection pool. Repeat for each server with no visible downtime to the end users.

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