当 .NET exe 位于网络上时,附属程序集和 FullTrust 问题

发布于 2024-08-27 12:19:30 字数 733 浏览 4 评论 0原文

我正在从网络共享执行我的.NET 应用程序。

自框架 3.5 SP1 起,如下所述: http://blogs.msdn.com/shawnfa/archive/2008/05/12/fulltrust-on-the-localintranet.aspx,主 exe 和所有 DLL 位于同一文件夹中 (< strong>但不包括子文件夹)被授予 FullTrust 安全策略。

我的问题是我有带有本地化字符串的附属程序集的子文件夹。

也就是说,我有:

1) FOLDER\APP.EXE
2) FOLDER\A whole bunch of DLLs
3) FOLDER\LANGUAGE1\Satellite assemblies
4) FOLDER\LANGUAGE2\Satellite assemblies

1 和 2 自动授予 FullTrust。

3 和 4 不是,因此我的申请速度非常慢。

有没有办法授予 3 和 4? 4 运行时的FullTrust安全策略,既然运行的应用程序有FullTrust?

如果没有,是否有一种干净的方法将附属程序集合并到仅一个 DLL 中?

I'm executing my .NET app from a network share.

Since framework 3.5 SP1, and as explained here: http://blogs.msdn.com/shawnfa/archive/2008/05/12/fulltrust-on-the-localintranet.aspx, the main exe and all the DLLs located in the same folder (but not subfolders) are granted with FullTrust security policy.

My problem is that I have subfolders for satellite assemblies with localized strings.

Namely, I have:

1) FOLDER\APP.EXE
2) FOLDER\A whole bunch of DLLs
3) FOLDER\LANGUAGE1\Satellite assemblies
4) FOLDER\LANGUAGE2\Satellite assemblies

1 and 2 are automatically granted with FullTrust.

3 and 4 are not and my application is really slow because of that.

Is there a way to grant 3 & 4 FullTrust security policy at runtime, since the application running has FullTrust?

If not, is there a clean way to have satellite assemblies merged into only one DLL?

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

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

发布评论

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

评论(1

若无相欠,怎会相见 2024-09-03 12:19:30

您可以使用自己创建的密钥对所有程序集进行签名。然后完全信任使用您的密钥签名的任何内容(但每个客户端使用一次 caspol)。或者,从可信来源获取密钥并用它签名(但这需要花钱)。

You can sign all your assemblies with a key created yourself. Then give full trust to anything signed with your key (but that uses caspol one time for each client). Alternatively, get a key from a trusted source and sign with that (but that costs money).

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