System.AddIn AddInView 程序集强名称问题
我已经构建了一个使用 System.AddIn API 运行的应用程序。加载项当前在具有 Internet 信任的外部 AppDomain 中激活。
为了提高性能,我为所有管道组件添加了强名称。但是,一旦我执行此操作,在尝试激活我的加载项时就会出现以下异常:
System.Security.SecurityException:该程序集不允许部分受信任的调用者。
查看融合日志,错误消息表明这是由于 AddInView 程序集不允许部分受信任的调用者造成的。但是,我已将 [程序集:AllowPartiallyTrustedCallers] 属性添加到程序集中。 AddInView 唯一引用的程序集是:
- System.
- System.AddIn
- System.AddIn.Contract
有如何解决此问题的想法吗?
I've built up an application that works using the System.AddIn APIs. Add-ins are currently activated in an external AppDomain with Internet trust.
In order to improve performance I've added strong names to all my pipeline components. However as soon as I did this I get the following exception when trying to activate my add-in:
System.Security.SecurityException: That assembly does not allow partially trusted callers.
Looking at the fusion logs the error messages indicate this is due to the AddInView assembly not allowing partially trusted callers. However, I've added the [assembly: AllowPartiallyTrustedCallers] attribute to the assembly. The only assemblies AddInView references are:
- System.
- System.AddIn
- System.AddIn.Contract
Any ideas how to resolve this issue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您需要将
[assemble:AllowPartiallyTrustedCallers]
属性添加到 AddInView 和 AddInViewAdapters 程序集。
I think you need to add the
[assembly:AllowPartiallyTrustedCallers]
attribute to the AddInView and the AddInViewAdapters assemblies.