动态加载 HTTP 模块,可以使用 Unity 吗?

发布于 2024-07-12 01:01:38 字数 345 浏览 6 评论 0原文

有没有人看过任何关于如何为 IIS 动态加载 HTTP 模块的操作方法、文档或其他内容?

基本上我想做的是加载 HTTP 模块,我将其称为 HTTPModuleA、HTTPModuleB 和 HTTPModuleC。 然而,这些模块可以随时使用 HTTPModuleD、HTTPModuleE 或 HTTPModuleF 进行更改。 我基本上想将它们放入配置文件中,但不想有引用或任何东西。 我希望能够将它们放入特定的路径(即程序集的 dll)中,设置文件/路径的配置文件条目,然后让 Unity 或其他框架拾取它们并加载它们。 可能每 2-3 分钟扫描一次更改。

任何关于如何完成这项工作的想法都非常感谢。 谢谢!

Has anyone seen any how-to, documentation, or otherwise about how to load HTTP Modules dynamically for IIS?

Basically what I am trying to do is to load HTTP Modules, which I'll call HTTPModuleA, HTTPModuleB, and HTTPModuleC. The modules however could be changed out at any time with HTTPModuleD, HTTPModuleE, or HTTPModuleF. I basically would like to put them in the config file, but don't want to have references or anything. I'd like to be able to merely have them dropped into a particular path (the dll of the assembly that is), set the config file entry for the file/path, and have Unity, or something other framework just pick them up and load them. Possibly scanning for changes every 2-3 minutes or something.

Any notions on how to get this done are much appreciated. Thx!

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

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

发布评论

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

评论(2

肤浅与狂妄 2024-07-19 01:01:39

您可以将程序集放在 /bin 目录中,并让 ASP.NET 加载模块,而无需在 Web 应用程序中引用程序集。

You can drop assemblies in the /bin directory and have ASP.NET load a module without ever referencing the assemblies in your web application.

夏有森光若流苏 2024-07-19 01:01:38

Unity 不是一种动态加载模块的方法。 您可以查看 Microsoft Extensibility Framework 来动态加载模块,我听说这很棒。

我个人构建了一个类似的系统,并使用了 CodeProject 上的一篇文章作为指导,但我现在找不到它。 我确实找到了这个(类似)并展示了如何使用文件观察器,它比每 2 或 3 分钟轮询一次更好:
http://www.codeproject.com/KB/cs/dynamicpluginmanager.aspx

Unity is NOT a way to dynamically load modules. You could look at the Microsoft Extensibility Framework to dynamically load modules, which I hear is great.

Personally I built a similar system and used an article on CodeProject for guideance, but I can't find it now. I did find this (which is similar) and shows how to use the file watcher which is nicer than polling every 2 or 3 min:
http://www.codeproject.com/KB/cs/dynamicpluginmanager.aspx

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