在浏览器信任的应用程序 Silverlight 5 中
借助新的 Silverlight 5,我们现在可以拥有浏览器内增强信任的应用程序。 但是,我在部署该应用程序时遇到了一些问题。
当我从 Visual Studio 测试应用程序时,一切正常,因为如果网站托管在本地计算机(localhost,127.0.0.1)上,它会自动授予所有权利。
我在 MSDN 上看到,我必须遵循 3 个步骤才能使其在任何网站上运行:
- 对 XAP 进行签名 — 我按照 Microsoft 教程进行了
- 安装受信任的发布者证书存储 — 我也按照 Microsoft 教程进行了
- 添加注册表项值
AllowElevatedTrustAppsInBrowser
。
第三步是我最不确定的一步。我们需要在本地计算机还是服务器上添加此注册表项? Silverlight中是否有任何自动功能来添加此键,或者最好制作一个批处理文件?
即使完成了这三个步骤,当从 localhost 以外的其他 URL 调用时,应用程序仍然无法工作。
有人成功实施了浏览器内提升信任的应用程序吗?你看到我做错了什么了吗?
来源:
With the new Silverlight 5, we can now have an In-Browser elevated-trust application.
However, I'm experiencing some problems to deploy the application.
When I am testing the application from Visual Studio, everything works fine because it automatically gives every right if the website is hosted on the local machine (localhost, 127.0.0.1).
I saw on MSDN that I have to follow 3 steps to make it work on any website:
- Signed the XAP — I did it following the Microsoft tutorial
- Install the Trusted publishers certificate store — I did it too following the Microsoft Tutorial
- Adding a Registry key with the value
AllowElevatedTrustAppsInBrowser
.
The third step is the one I am the most unsure about. Do we need to add this registry key on the local machine or on the server? Is there any automatic function in Silverlight to add this key or is it better to make a batch file?
Even with those three steps, the application is still not working when called from another url than localhost.
Does anybody have successfully implemented an in-browser elevated-trust application? Do you see what I'm doing wrong?
Sources:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
有很多很好的资源描述了这个过程,包括这里的回复中提到的资源。我想记录对我们有用的步骤。 (Silverlight 5.1.10411.0)
以下是我们启用浏览器内可信应用程序所采取的步骤:
处设置 DWORD 注册表项AllowElevatedTrustAppsInBrowser = 1< pre>SL 32 位路径:HKLM\Software\Microsoft\Silverlight
注意:
There are lots of great resources describing this process, including the ones mentioned in responses here. I wanted to document the steps that worked for us. (Silverlight 5.1.10411.0)
Here are the steps that we took to enable In-Browser Trusted Applications:
Note:
我已成功创建具有提升权限的浏览器内 Silverlight 5 应用程序 这篇 msdn 文章。
您可以随时检查您的应用程序是否已提升权限:
我的问题是,虽然它在 Firefox 14 中运行没有问题,但 IE9 需要在 Windows 7 中以管理员身份运行。
我目前正在寻找一种方法,使其能够在不以管理员身份执行 IE 的情况下工作。
如果有人知道如何做到这一点,我将不胜感激。
编辑:
哇。实际上,来自 Aaron McIver 帖子的链接对我帮助很大。我刚刚关闭了“启用保护模式”,现在无需管理员权限即可正常工作。
:D
I have successfully created in-browser Silverlight 5 app with elevated privileges fallowing this msdn article.
You can always check if Your app has elevated privs with:
My problem is that while it works without problem in Firefox 14, IE9 needs to be run as administrator in Windows 7.
I am currently looking for a way to make it work without executing IE as administrator.
If anybody knows how to do this I would appreciate the help.
Edit:
Wow. Actually link from Aaron McIver post helped me a lot. I just switched "Enable protected mode" off and now it works just fine without administrator rights.
:D
注册表编辑需要在客户端计算机上进行;执行 Silverlight 应用程序的计算机。
有一个演示,通过XAMLGEEK;因为你所安排的一切都应该让你处于工作状态。 Mike Taulty 还有一个 出色的演练。
The registry edit needs to be on the client machine; the machine executing the Silverlight application.
There is a demo available via the XAMLGEEK; as everything you laid out should get you in a working state. Mike Taulty also has an excellent walk through.
我想将 silverlight 应用程序连接到托管应用程序的同一主机地址上端口 10001 上的套接字。
是否可以在不更改客户端任何内容的情况下完成此操作?
I would like to connect with silverlight app to socket on port 10001 on same host address where app is hosted.
Is it possible to done that without changing anything on client side?
我也面临同样的问题
当我们使用仅适用于本地计算机的测试证书时,
。您必须使用另一个证书签署您的应用程序,它才能工作。
问题链接 Silverlight 5 在浏览器可信应用程序中
i am also face same kind of problem
when we use test certificate that will work only for local machine.
you have to sign your app with another certificate , and it will work.
question link Silverlight 5 In browser trusted application