从如今开始相关文章请到: http://lko2o.com/moonhtml
接着第二课:《ASP.NET SignalR系列》第二课 SignalR的使用说明android
SignalR 服务端组件能够被部署在诸多的服务器配置中,本节描述了它所支持的操做系统版本,.NET framework,IIS、以及其余组件web
SignalR服务端组件能够被部署在一下的服务端和客户端操做系统中.注意使用WebSockets时,SignalR须要Windows Server 2012 或者Windows 8,浏览器
(WebSocket可以在Windows Azure Web Sites上使用,只要站点的.NET framework 版本达到4.5,且WebSocket能在站点的配置页面使用)服务器
SignalR 2仅仅支持.NET Famework 4.5,你可去Recommended Updates看看相关信息。websocket
当SignalR部署在IIS中,须要下面的版本支持。注意若是使用在咱们本身的操做系统上,如开发所用的环境(Windows 8 or Windows 7),全部版本的IIS和Cassini不该该被使用,由于这里有一个10同时并发的限制,由于链接是短暂、频繁从新创建的、且不会当即被dispose,因此很快就会达到限制。IIS Express能够被使用在通常的操做系统上。并发
同时注意SignalR使用WebSocket时,IIS 8 或者 IIS 8 Express是你须要的,服务器必须用Windows 8, Windows Server 2012, 或者更高,同时WebSocket必须在IIS中可用。你能够去之类看看如何开启IIS的WebSocket功能:IIS 8.0 WebSocket Protocol Supportapp
SignalR可以在不少客户端平台下运行,本节描述了客户端浏览器、桌面应用程序、Silverlight应用程序及手机设备在使用SignalR的需求。
asp.net
1.浏览器
less
SignalR支持许多中种类的浏览器,尤为是最近浏览器的两个版本。
在浏览器中使用signalr的应用程序必须使用jQuery的版本>=1.6.4.
signalr可在如下浏览器中使用:
通信协议 | Internet Explorer |
Chrome (Windows or iOS) |
Firefox | Safari (OSX or iOS) |
Android |
---|---|---|---|---|---|
WebSockets | 10+ | current - 1 | current - 1 | current - 1 | N/A |
Server-Sent Events | N/A | current - 1 | current - 1 | current - 1 | N/A |
ForeverFrame | 8+ | N/A | N/A | N/A | 4.1 |
Long Polling | 8+ | current - 1 | current - 1 | current - 1 | 4.1 |
2.桌面应用程序和Silverlight程序
注意:有人在作supersocket,因此咱们可让它运行得更强大,一下是官方给出的图
通信协议 | .NET application | Silverlight |
---|---|---|
Web Sockets | Windows 8+ and .NET 4.5+ | N/A |
Forever Frame | N/A | N/A |
Server-Sent Events | .NET 4+ | 5+ |
Long Polling | .NET 4+ | 5+ |
3.Windows Store和Windows Phone应用程序
如上,咱们能够借助第三方作事情
Transport | Windows Store/ .NET |
Windows Store/ JavaScript |
Windows Phone/ IE |
Windows Phone/ .NET |
---|---|---|---|---|
WebSockets | N/A | Win8+ | 8+ | N/A |
Forever Frame | N/A | Win8+ | 7.5+ | N/A |
Server-Sent Events | Win8+ | N/A | N/A | 8+ |
Long Polling | Win8+ | Win8+ | 7.5+ | 8+ |
建议你对SignalR服务器端作如下更新:
.NET Framework 4.5 here.
前面几章是基本功,你们不要厌烦,后面进入实际使用中