WCF Web socket客户端也需要在windows 8上运行 [英] WCF Web socket client also need to run on windows 8

查看:29
本文介绍了WCF Web socket客户端也需要在windows 8上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 WCF 网络套接字的新手,我正在尝试使用网络套接字实现双工服务.我已经使用以下示例实现了 wcf Web 套接字服务,并且运行良好.

I am new to WCF web socket and I am trying to implement duplex service using web socket. I have implemented the wcf web socket service using the following example and it works fine.

http://msdn.microsoft.com/en-us/library/hh977020.aspx

我知道 Web 套接字的 WCF 服务的最低要求是 windows 8 和 .net framework 4.5.所以我在 windows server 2012 服务器机器上托管了我的服务.然后我写了WCF web socket客户端来访问服务,我的客户端是windows表单应用程序在 Windows 7 上运行.我收到以下错误.

I know the minimum requirement for WCF service for web socket is windows 8 and .net framework 4.5. So I have hosted my service on windows server 2012 server machine. Then I have written WCF web socket client to access the service and my client is windows form applications runs on windows 7. I got the following error.

该平台本身不支持客户端 WebSocket.可以通过以下方式在此平台上启用对客户端 WebSocket 的支持提供一个实现System.ServiceModel.Channels.ClientWebSocketFactory."

"This platform does not support client side WebSockets natively. Support for client side WebSockets can be enabled on this platform by providing an implementation of System.ServiceModel.Channels.ClientWebSocketFactory."

Web 服务客户端是否也需要有 Windows 8?如果需要,是否有任何第三方库可以访问 WCF web socket 服务.

Does web service client also need to have windows 8? If it needs are there any third party libraries to access WCF web socket service.

非常感谢您的回复.

推荐答案

您需要 win8 或 2012server 才能在 WCF 中使用 Microsoft WebSocket 命名空间.您还可以查看 SignalR,当 WebSockets 不可用时,它会回退到其他技术.

You will need win8 or 2012server to be able to use the Microsoft WebSocket namespace in your WCF. You could also take a look at SignalR that will fallback to other techniques when WebSockets is not available.

您还可以使用将在 .NET 4 上运行 websockets 的 XSockets.NET(因此不需要 win8 或 2012server).

You can also use XSockets.NET that will run websockets on .NET 4 (so there is no need for win8 or 2012server).

您还可以选择 SuperWebSocket 和 Fleck 作为 .NET 4 的选项.

You also have SuperWebSocket and Fleck as options of .NET 4.

在此处添加了来自 WCF .NET 4 的 WebSockets 示例 https://github.com/XSockets/XVA/tree/master/XVA-07-02-BoostWCF/Any%20OS

Added sample with WebSockets from WCF .NET 4 here https://github.com/XSockets/XVA/tree/master/XVA-07-02-BoostWCF/Any%20OS

这篇关于WCF Web socket客户端也需要在windows 8上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆