当 .NET exe 位于网络上时,附属程序集和 FullTrust 问题
我正在从网络共享执行我的.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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用自己创建的密钥对所有程序集进行签名。然后完全信任使用您的密钥签名的任何内容(但每个客户端使用一次 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).