如何阻止 IIS 尝试加载 dll?

发布于 2024-08-27 21:51:44 字数 398 浏览 5 评论 0原文

我的项目是一个使用 Windows 工作流的语音服务器应用程序。它作为 IIS 下的应用程序运行。它支持插件系统。发生的情况如下:

  • 将 DLL 加载到内存中并设置 InvokeWorkflow 控件的类型。
  • 当 InvokeWorkflow 控件运行时,它似乎从加载的程序集中正确实例化工作流 - 它完成了 Initialize 方法。
  • 一切都会崩溃,目标工作流程永远不会执行。
  • 我可以通过将 DLL 的副本放入应用程序的执行目录中来解决此问题。然后工作流正确执行

,因此 IIS 似乎正在尝试重新加载程序集,即使它已经在内存中。

是否有办法在 IIS 中改变或禁用此行为?也许我可以编写一个钩子来拦截加载 dll 的请求并使用我自己的逻辑来执行此操作?

My project is a Speech Server application using Windows Workflow. It runs as an app under IIS. It supports a plug-in system. Here is what is happening:

  • Load DLL into memory and set the type on an InvokeWorkflow control.
  • When the InvokeWorkflow control runs, it appears to correctly instantiate the workflow from the loaded assembly - it completes the Initialize method.
  • Everything crashes an burns, the target workflow is never executed.
  • I can resolve this by putting a copy of the DLL in the application's executing directory. The workflow then executes correctly

So it appears that IIS is trying to reload the assembly, even though its already in memory.

Is there anyway to alter or disable this behavior in IIS? Perhaps a hook I can write that will intercept the request to load the dll and use my own logic to do so?

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

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

发布评论

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

评论(1

栖迟 2024-09-03 21:51:44

你从哪里加载DLL?您可能会遇到 DLL 或其位置的某些运行时安全限制。

Where are you loading the DLL from? You may be hitting some runtime security constraints with the DLL or its location.

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