SignalR支持各種服務(wù)器和客戶端的配置。此外,每種傳輸方式都有自身的配置要求和限制;如果某種傳輸方式不被系統(tǒng)支持,SignalR優(yōu)雅地將故障轉(zhuǎn)移到其他類型的傳輸方式。詳細(xì)說(shuō)明,請(qǐng)參閱上一章的傳輸方式和協(xié)商轉(zhuǎn)換。
1) 系統(tǒng)要求:Win7,win8,win2008r2,win2012或以上系統(tǒng)
2) .NetFramework版本要求:.NetFramework4.5或以上版本
3) IIS版本要求:
a) IIS7,IIS7.5中,需要 extensionless URLs支持。
b) IIS8或以上版本
c) IIS必須運(yùn)行在“集成模式”(integrated mode)下,不支持“經(jīng)典模式”(classic mode)。 因?yàn)榻?jīng)典模式下,可能存在長(zhǎng)達(dá)30秒的消息延遲,甚至?xí)l(fā)送不出去。
d) 托管應(yīng)用程序必須運(yùn)行在“完全信任模式”(full trust mode)下。
e) 注意:在win7和win8下,IIS只支持10人的連接。
f) 在網(wǎng)站的配置頁(yè)面中啟用網(wǎng)絡(luò)套接字(Web Sockets)
1) SignalR在瀏覽器中的應(yīng)用程序必須使用jQuery版本1.6.4或主要版本(如 1.7.2 ,1.8.2 ,1.9.1或以上的版本。)我們自己推薦使用Jquery1.83
2) 以下列出各種傳輸協(xié)議對(duì)各種系統(tǒng)瀏覽器版本的支持:
傳輸協(xié)議對(duì)應(yīng)各種瀏覽器的需要 | |||||
傳輸方式 | Internet Explorer | Chrome (Windows or iOS) | Safari (OSX or iOS) | Android | |
WebSockets | 10+ | current - 1 | current - 1 | current - 1 | 2.0 |
Server-Sent Events | 不支持 | current - 1 | current - 1 | current - 1 | 不支持 |
ForeverFrame | 8+ | 不支持 | 不支持 | 不支持 | 4.1 |
Long Polling | 8+ | current - 1 | current - 1 | current - 1 | 4.1 |
具體可查閱http://testswarm.signalr.net/user/signalr
3) 對(duì)windows桌面和sliverlight的支持:
傳輸協(xié)議 | .NET application | Silverlight |
Web Sockets | Windows 8+ and .NET 4.5+ | 支持 |
Forever Frame | 不支持 | 不支持 |
Server-Sent Events | .NET 4+ | 5+ |
Long Polling | .NET 4+ | 5+ |
4) 對(duì)window store 和 windows phone的支持:
傳輸協(xié)議 | Windows Store/ .NET | Windows Phone/ IE | Windows Phone/ .NET | |
WebSockets | 不支持 | Win8+ | 8+ | 8+ |
Forever Frame | 不支持 | Win8+ | 7.5+ | 不支持 |
Server-Sent Events | Win8+ | 不支持 | 不支持 | 8+ |
Long Polling | Win8+ | Win8+ | 7.5+ | 8+ |
當(dāng)然,微軟的SignalR2.0還可以支持所有windowsPhone8.0以上,Android2.0以上和IOS6.0以上手機(jī),雖然不是微軟開(kāi)發(fā)的客戶端類庫(kù),但經(jīng)過(guò)幾年發(fā)展,已經(jīng)相當(dāng)穩(wěn)定,如果大家有興趣,我還會(huì)在這篇快速入門(mén)后,編寫(xiě)的一套比較詳細(xì)的入門(mén)教程,到時(shí)候,給大家一個(gè),SignalR,鏈接一切移動(dòng)和web設(shè)備的相關(guān)講解,敬請(qǐng)期待!
新聞熱點(diǎn)
疑難解答
圖片精選
網(wǎng)友關(guān)注