银光应用程序。使用 OOB 挂起/等待安全 WCF 服务

发布于 2024-09-11 17:23:29 字数 693 浏览 1 评论 0原文

我有一个 SL 4 应用程序(具有 OOB 和提升的权限),它连接到安全的 WCF 服务。但 WCF 服务永远不会被调用,应用程序等待连接,然后超时。我已经检查过 fiddler 和wireshark,我发现没有建立连接,应用程序只是等待!如您所知,如果应用程序 crossdomain.xml 未请求提升的权限,则需要完成设置等,那是因为我使用 OOB 和提升的权限。如果我制作 SL 应用程序。不是 OOB,应用程序连接并获取 crossdomain.xml 并获取安全异常,这是预期的。

为了进一步调查这个问题,我只是用 VS 2010、SL4 等设置了另一台机器。我创建了一个新的 SL4 项目和一个不安全的 WCF 服务。在具有提升权限的 OOB 模式下,同样的问题再次发生。请注意,这台机器是干净的 XP(您可能认为某些库可能混合在一起)。我还检查了安装 SL 的 WPF 应用程序的问题,一切正常,可以建立连接。以下是我的示例解决方案,请尝试并发送反馈。

我的平台描述如下:

  • Windows 7
  • Silverlight 4、OOB、 提升权限
  • VS 2010
  • A WCF 服务。

下载解决方案

I have an SL 4 application (with OOB and elevated privileges) which makes a connection to a secure WCF service. But WCF service is never called, the application waits to connect and afterwards timeouts. I have checked with fiddler and wireshark and I saw no connection is made, application just waits! As you know if elevated privileges is not requested by the application crossdomain.xml etc. setup need be done, that's because I use OOB and elevated privileges. And If I make the SL app. not OOB, application connects and gets crossdomain.xml and gets security exception, which is expected.

To investigate the problem further, I just setup another machine with VS 2010, SL4 etc. I created a new SL4 project and a WCF service which is not secure. In OOB mode with elevated privileges the same problem occured again. Please note this machine was a clean XP(you might think that some libraries might be mixed up). Also I have checked the problem with an WPF application insted of SL and everything was normal, the connection could be made. Below is my sample solution, please try and send feedback.

My platform is described below:

  • Windows 7
  • Silverlight 4, OOB,
    Elevated Privileges
  • VS 2010
  • A WCF
    service.

Download the solution

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

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

发布评论

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

评论(1

原野 2024-09-18 17:23:29

好吧,问题是:在应用程序启动事件中访问 WCF 服务是不可能的。您需要在更高的阶段调用服务,例如在 MainPage 构造函数中或在 Loaded 事件中。

Well, the problem is: accessing to a WCF service in App startup event is not possible. You need to call service in higher stages like in MainPage constructor or on Loaded event.

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