如何检测哪些程序集需要部分受信任的调用者属性?

发布于 2024-07-26 05:42:32 字数 319 浏览 3 评论 0原文

我从 CodePlex 下载了一个 Web 项目,但在 Application_Start 中收到以下错误:

系统.Security.SecurityException: 该大会不允许部分 值得信赖的来电者。

该项目引用了其他开源项目中的几个其他程序集。 我的理论是其中之一没有设置 AllowPartiallyTrustedCallers 属性(CodePlex 项目中的所有程序集都有)。

如何判断哪些程序集设置了此属性,哪些程序集没有设置?

I have downloaded a web project from CodePlex and am getting the following error in Application_Start:

System.Security.SecurityException:
That assembly does not allow partially
trusted callers.

This project references several other assemblies from other open source projects. My theory is that one of these do not have the AllowPartiallyTrustedCallers attribute set (all of the assemblies in the CodePlex project do).

How can I tell which assemblies have this attribute set, and which don't?

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

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

发布评论

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

评论(2

尘曦 2024-08-02 05:42:32

我不确定我是否遗漏了您问题中的某些内容,但是您引用的这些程序集,您可以在 .NET 反射器? 使用它可以让您查看文件的 属性,该属性应显示它们是否设置了 APTC 属性。

I'm not sure if I've missed something in your question, but these assemblies that your referencing, can you open them in .NET Reflector? Using that will allow you to view the <Assembly:()> attributes for the file, which should show whether they have the APTC attribute set or not.

寂寞笑我太脆弱 2024-08-02 05:42:32

解决了这个问题 - 我刚刚在组件上使用了 Reflector。 每个 [assemble] 属性都列在那里,包括

[assembly: AllowPartiallyTrustedCallers]

Worked this out - I just used Reflector on the assemblies. Every [assembly] attribute is listed there including

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