简体   繁体   English

Windows Phone 7 WCF回叫轮询双工绑定错误

[英]Windows Phone 7 WCF CallBack PollingDuplex Binding Error

I am using WCF in Windows Phone 7 project. 我在Windows Phone 7项目中使用WCF。 I want CallBack Services of WCF in my Project. 我在我的项目中需要WCF的回调服务。 But, I got an error while using wsDualHttpBinding in the project. 但是,在项目中使用wsDualHttpBinding时出现错误。 So, I googled about it a lot. 因此,我在Google上搜索了很多。 So, the conclusion after me is to use PollingHttpBinding with the Windows phone Application. 因此,我得出的结论是将PollingHttpBinding与Windows Phone应用程序一起使用。 So, I resume my work with the PollingDuplex. 因此,我恢复了PollingDuplex的工作。 I used the PollingDuplex reference in the Server side WCF Service from the path: "C:\\Program Files (x86)\\Microsoft SDKs\\Silverlight\\v4.0\\Server\\System.ServiceModel.PollingDuplex.dll". 我在服务器端WCF服务中从以下路径使用了PollingDuplex引用:“ C:\\ Program Files(x86)\\ Microsoft SDKs \\ Silverlight \\ v4.0 \\ Server \\ System.ServiceModel.PollingDuplex.dll”。 and it works well and also able to consume the service through SLSVCUTIL.EXE. 而且效果很好,还可以通过SLSVCUTIL.EXE使用服务。 But when I tries to include the PollingDuplex ("C:\\Program Files (x86)\\Microsoft SDKs\\Silverlight\\v4.0\\Client\\System.ServiceModel.PollingDuplex.dll") reference to my Windows Phone 7 Client side code, then it gives the following error while adding the reference: 但是,当我尝试包含对Windows Phone 7客户端代码的PollingDuplex(“ C:\\ Program Files(x86)\\ Microsoft SDKs \\ Silverlight \\ v4.0 \\ Client \\ System.ServiceModel.PollingDuplex.dll”)引用时,添加参考时,它会出现以下错误:

"Type universe cannot resolve assembly: System.ServiceModel.Extensions, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" “类型Universe无法解析程序集:System.ServiceModel.Extensions,版本= 2.0.5.0,区域性=中性,PublicKeyToken = 31bf3856ad364e35”

Please help me in resolving this error. 请帮助我解决此错误。

System Specifications: 系统规格:

Windows 8 ( 64 Bit ) Windows 8(64位)
Visual Studio 2012 Visual Studio 2012
Windows Phone 8 SDK Windows Phone 8 SDK
Silverlight 4.0 Silverlight 4.0

My guess is Duplex dll you are referencing wasn't built for Windows Phone or by using Windows Phone compatible assemblies...so one would need those dlls to be rebuilt from scratch using WP assemblies...I had simmilar problems trying to reference some assemblies in Windows Phone 7 that were made for desktop silverlight instead back when augmented reality wasn't supported and people used desktop Silverlight Augmented Reality project (SLAR)...eventually there was a solution but it was cumbersome. 我的猜测是您引用的Duplex dll不是为Windows Phone构建的,也不是通过使用Windows Phone兼容程序集构建的...因此,人们需要使用WP程序集从头开始重建那些dll ...我在尝试引用某些dll时遇到了类似的问题当不支持增强现实并且人们使用桌面Silverlight增强现实项目(SLAR)时,Windows Phone 7中为桌面Silverlight制作的程序集反过来了……最终有一个解决方案,但是它很麻烦。 If you were able to solve this I'd really like to know how please? 如果您能够解决这个问题,我真的很想知道如何取悦? Is PollingDuplex supported at all on Windows Phone? Windows Phone是否完全支持PollingDuplex? If not are there any alternatives working with the same WCF server binding? 如果没有,还有其他替代方法可以用于同一WCF服务器绑定吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM