使用新的 Silverlight 5,我们现在可以拥有一个 In-Browser 提升信任应用程序。
但是,我在部署应用程序时遇到了一些问题。
当我从 Visual Studio 测试应用程序时,一切正常,因为如果网站托管在本地计算机(localhost,127.0.0.1)上,它会自动赋予所有权利。
我在 MSDN 上看到我必须遵循 3 个步骤才能使其在任何网站上运行:
AllowElevatedTrustAppsInBrowser
的注册表项. 第三步是我最不确定的一步。我们需要在本地机器上还是在服务器上添加这个注册表项? Silverlight 中是否有自动添加此 key 的功能,还是制作批处理文件更好?
即使有了这三个步骤,当从 localhost 之外的另一个 url 调用时,应用程序仍然无法工作。
是否有人成功实现了浏览器内提升信任的应用程序?你看到我做错了吗?
资料来源:
最佳答案
有很多很好的资源描述了这个过程,包括这里的回复中提到的那些。我想记录对我们有用的步骤。 (银光 5.1.10411.0)
以下是我们为启用浏览器内受信任的应用程序所采取的步骤:
SL 64 bit path: HKLM\Software\Wow6432Node\Microsoft\Silverlight
SL 32 bit path: HKLM\Software\Microsoft\Silverlight
<RequireInBrowserElevation>true</RequireInBrowserElevation>
<InBrowserSettingsFile>Properties\InBrowserSettings.xml</InBrowserSettingsFile>
处设置 DWORD 注册表项 AllowElevatedTrustAppsInBrowser = 1 <InBrowserSettings>
<InBrowserSettings.SecuritySettings>
<SecuritySettings ElevatedPermissions="Required" />
</InBrowserSettings.SecuritySettings>
</InBrowserSettings>
笔记:
关于silverlight - 在浏览器受信任的应用程序 Silverlight 5,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8570470/