Silverlight WCF服务调用异常

发布于 2024-09-11 16:55:29 字数 575 浏览 2 评论 0原文

Silverlight 3.0 应用程序尝试调用 WCF 服务,但应用程序甚至无法建立与端点的连接。我检查了网址等,一切似乎都正常。从浏览器等其他工具访问该服务是可行的。当我在 Visual Studio 中调试应用程序时,第一次调用服务时,会转储以下输出:

'sllauncher.exe' (Silverlight): Loaded 'C:\Program Files\Microsoft Silverlight\4.0.50401.0\System.ServiceModel.dll'
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll

当发生上述错误时,应用程序开始等待,直到超时。

此外,Silverlight 应用程序是“浏览器外”应用程序,其提升的权限设置为 true,因此不需要 crossdomain.xml。

我想知道上面的System.IO.FileNotFoundException是否可以通过做一些事情来详细说明?或者您可能已经想到了这个问题。

不管怎样,谢谢。

A Silverlight 3.0 application tries to call WCF service but the application can not even establish connection to the endpoint. I had checked URLs etc. and every thing seems ok. Accessing the service from other tools like browser works. When I debug application in Visual Studio when the first call to the service is made below output is dumped:

'sllauncher.exe' (Silverlight): Loaded 'C:\Program Files\Microsoft Silverlight\4.0.50401.0\System.ServiceModel.dll'
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll

When the above error happens, application starts to wait until timeout.

Also Silverlight application is Out of Browser one with elevated permissions set to true so no need for crossdomain.xml.

I wonder if the above System.IO.FileNotFoundException can be detailed by doing something? Or may be you may have come up with this problem.

Thanks anyway.

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

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

发布评论

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

评论(1

夜清冷一曲。 2024-09-18 16:55:29

这是从 App.xaml.cs 的高层调用 WCF 服务的问题,从 MainPage.xaml.cs 调用时问题就消失了。

It was an issue of calling WCF service from a high level at App.xaml.cs, the problem is gone when called from MainPage.xaml.cs.

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