使用自定义 AppDomain 激活 MAF 加载项时出现问题

发布于 2024-10-03 12:06:38 字数 440 浏览 0 评论 0原文

我正在尝试使用接受 AppDomain 的 MAF 的 AddInToken.Activate() 方法的重载,以便我可以传递由我的客户端应用程序创建的应用程序域。

当传递的 AppDomain 配置了不受限制的权限时,它可以正常工作,但是如果我减少权限集(例如,通过使用 Internet 沙箱权限集),MAF 会抛出 SecurityException执行必要的反射以发现其加载项时。既然 MAF 组件安装在 GAC 中,难道它们不应该被完全信任吗?

我知道 MAF 提供了其他方法重载,这些重载将为我创建一个 AppDomain 并允许我指定分配给它的权限集,但我无法在我的应用程序中使用这种方法,因为我需要能够指定我自己的强名称程序集的列表,这些程序集将被给予完全信任。

有什么建议吗?

谢谢,

蒂姆

I am trying to use the overload of MAF's AddInToken.Activate() method that accepts an AppDomain, so that I can pass an application domain created by my client application.

When the passed AppDomain is configured with unrestricted permissions it works fine, but if I reduce the permission set (for example, by using the Internet sandbox permission set) MAF throws a SecurityException when performing the reflection necessary to discover its add-ins. Since the MAF assemblies are installed in the GAC, shouldn't they be fully trusted?

I know that MAF offers other method overloads that will create an AppDomain for me and allow me to specify the permission set assigned it, but I can't use this approach in my app, because I need to be able to specify the list of my own strong-named assemblies that will be given full trust.

Any suggestions?

Thanks,

Tim

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文