如何在 Intranet 上运行完全信任 XBAP?

发布于 2024-07-15 17:56:02 字数 235 浏览 8 评论 0原文

我制作了一个托管旧 WinForms 控件的 WPF 浏览器应用程序(我还没有完全迁移到 WPF)。 使用 WindowsFormsHost 意味着我的浏览器应用程序需要完全信任才能运行。 这对我来说不是问题,因为这个应用程序只适合在我公司的内联网上运行。 但是,当我将 xbap 部署到网络共享后,它拒绝运行,并显示“未授予信任”。

我可以使用哪些方法向存储在公司 Intranet 上的 XBAP 应用程序授予完全信任?

I've made a WPF Browser Application that hosts old WinForms controls (I haven't migrated fully to WPF yet). Using WindowsFormsHost means my Browser App requires Full Trust to run. This is not a problem for me since this app is only meant to be run on the intranet at my company. However, after I deploy the xbap to a network share, it refuses to run, saying "Trust not granted".

What are the methods I can use to grant Full Trust to XBAP applications stored on my companies intranet?

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

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

发布评论

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

评论(3

千纸鹤带着心事 2024-07-22 17:56:02

到目前为止,我已经找到了两种方法来做到这一点。 通过 在目标计算机上安装证书

或者通过更简单的方法,仅适用于内网 此处

部署自定义 CLR 安全策略
修改默认值
给定区域的权限集

所以我就是这样做的,并且它有效。 以下是我如何让它工作的详细步骤:

  1. 打开“控制面板”>“ 管理工具> .NET Framework 2.0 配置
  2. 展开运行时安全策略 > 机> 代码组> All_Code
  3. 右键单击​​ All_Code,然后单击新建...
  4. 创建一个新代码组,我将其命名为 MyProject_FullTrust_Zone
  5. 选择 URL 条件类型并指定将在其中部署应用程序的网络路径。
  6. 选择“使用现有权限集”,并将其设置为“完全信任”。

现在,此方法的唯一问题是我必须将此更改部署到数百台计算机。 那么也许还有更简单的方法来做到这一点?

So far, I've found 2 ways to do this. Through a really complicated method of installing certificates on the target machine.

Or through a simpler method, which is only suitable for intranets here:

Deploy a custom CLR Security policy
that modifies the default
permissionset for the given zone

So I did just that, and it works. Here's the detailed steps how I got it to work:

  1. Open Control Panel > Administrative Tools > .NET Framework 2.0 Configuration
  2. Expand Runtime Security Policy > Machine > Code Groups > All_Code
  3. Right Click All_Code and click New…
  4. Create a new code group, I named mine MyProject_FullTrust_Zone
  5. Choose the URL condition type and specify the path on the network where the apps will be deployed.
  6. Choose Use Existing permission set, and set it to Full Trust.

Now the only problem with this method, is that I have to deploy this change to hundreds of machines. So maybe there's still a simpler way to do this?

悸初 2024-07-22 17:56:02

它将是 可能在计划于 2010 年上半年发布的 .Net 4.0 中实现。它现在处于测试阶段,但它附带了 上线许可证 允许您“上线”使用 .Net 框架的测试版。

It will be possible in .Net 4.0 planning to be released in the first half of 2010. It is now in a beta phase, but it comes with a go live license which allows you to 'go live' even with a beta version of the .Net framework.

泪冰清 2024-07-22 17:56:02

虽然我没有尝试过,但 XBAP 的路径是否已添加为受信任站点?

Although I haven't tried this, is the path to the XBAP added as a trusted site?

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