Why SignalR does not use WebSockets?
Why SignalR does not use WebSockets?
As you probably know SignalR supports multiple transports. The favor one and most powerful one is of course WEBSOCKET transport.
Unfortunately this transport cannot be always used in any infrastructure. When your application is started the client side of SignalR will check what transports are supported.
Interestingly there is a similar check at the server side.
For example, if you see following request
POST /Daenet.MySpy/signalr/signalr/send?transport=foreverFrame&connectionId=cd17bb01-23de-4181-97da-6514b9bbb58e HTTP/1.1
which is responded by following response, it means that web socket transport is not supported. If infrastructure does not support streaming SIgnalR will use fallback transport. In a case of Internet Explorer this will be foreverFrame as shown above.
To be sure that the server is not the problem, try to find out the request like following one:
GET /Daenet.MySpy/signalr/signalr/connect?transport=webSockets&connectionId=cd17bb01-23de-4181-97da-6514b9bbb58e&connectionData=%5B%7B%22name%22%3A%22trackerhub%22%7D%5D&tid=6 HTTP/1.1
If this request has failed with error 500 it means that the server does not support websockets. In this specific case server means the server (IIS) supports WebSockets, but ASP.NET version of your application which hosts SignalR does not support websockets.
It sound wired, buiit is not. If the server does not support WebSockets (for example Windows Server 2008) you will never get error 500 back. The client will switch to fallback transport automatically. This error is related to ASP.NET.
To fix it you need following in the web.config:
<system.web>
<compilation debug="true" targetFramework="4.5"/>
<httpRuntime targetFramework="4.5"/>
<pages controlRenderingCompatibilityVersion="4.0"/>
</system.web>
Why SignalR does not use WebSockets?的更多相关文章
- [机翻] WIRER ON THE WIRE - SIGNALR协议的非正式描述
原文 原文很简单,以下为机翻 WIRER ON THE WIRE - SIGNALR协议的非正式描述 我已经看到询问有关SignalR协议的描述的问题出现了很多.哎呀,当我开始关注SignalR时,我 ...
- SignalR系列续集[系列8:SignalR的性能监测与服务器的负载测试]
目录 SignalR系列目录 前言 也是好久没写博客了,近期确实很忙,嗯..几个项目..头要炸..今天忙里偷闲.继续我们的小系列.. 先谢谢大家的支持.. 我们来聊聊SignalR的性能监测与服务器的 ...
- SignalR快速入门 ~ 仿QQ即时聊天,消息推送,单聊,群聊,多群公聊(基础=》提升)
SignalR快速入门 ~ 仿QQ即时聊天,消息推送,单聊,群聊,多群公聊(基础=>提升,5个Demo贯彻全篇,感兴趣的玩才是真的学) 官方demo:http://www.asp.net/si ...
- C# BS消息推送 SignalR介绍(一)
1. 前言 本文是根据网上前人的总结得出的. 环境: SignalR2.x,VS2015,Win10 介绍 1)SignalR能用来持久客户端与服务端的连接,让我们便于开发一些实时的应用,例如聊天室在 ...
- ASP.NET SignalR入门
前言 之前在培训ASP.NET WebAPI的时候有提过SignalR这个技术,但当时只是讲了是用来做什么的,并没有多说.因为自己也是画图找资料的时候见到的.后来当一直关注的前端大神贤心发布LayIM ...
- 常见的Web实时消息交互方式和SignalR
标签: WebSocket SignalR 前言 1. Web消息交互技术 1.1 常见技术 1.2 WebSocket介绍 1.3 WebSocket示例 2. Signal 2.1 SignalR ...
- Asp.NET MVC 使用 SignalR 实现推送功能一(Hubs 在线聊天室)
简介 ASP .NET SignalR 是一个ASP .NET 下的类库,可以在ASP .NET 的Web项目中实现实时通信.什么是实时通信的Web呢?就是让客户端(Web页面)和服务器端 ...
- 使用SignalR实现消息提醒
Asp.net SignalR是微软为实现实时通信的一个类库.一般情况下,SignalR会使用JavaScript的长轮询(long polling)的方式来实现客户端和服务器通信,随着Html5中W ...
- SignalR 实现Web多人聊天室
ASP .NET SignalR 是一个ASP .NET 下的类库,可以在ASP .NET 的Web项目中实现实时通信.什么是实时通信的Web呢?就是让客户端(Web页面)和服务器端可以互相通知消 ...
随机推荐
- 利用Jenkins自动部署工具间接构建kettle的调度平台
关于Jenkins的介绍我就不说了,自己百度,因为这个工具调用脚本只是他的功能的冰山一角,其他功能我也不能理解,因为不是那个领域. 下面我就介绍一下为什么我们需要一个调度平台,以及学习完 ...
- ffmpeg错误隐藏框架分析
本文主要是分析ffmpeg的错误隐藏框架,故解码流程此处不会特地进行讨论,网上其他地方其实也有不少介绍相关流程的了,但发现基本没有介绍错误隐藏流程的,故本文希望能填补这个空白. 我们直接从decode ...
- gzip优化网络传输量提高传输效率[转]
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;us ...
- javascript加载图片获取图片尺寸信息方法
如果你遇到不方便从服务器取图片尺寸信息的话,用下面代码就很方便了. // 更新: // 05.27: 1.保证回调执行顺序:error > ready > load:2.回调函数this指 ...
- 超好用文件对比工具 – Beyond Compare
超好用文件对比工具 – Beyond Compare,开发中文件.目录对比神器,有了它,再也不用为找不到修改的内容而发愁了. 具备的丰富实用功能: 并列比较文件夹.FTP 网站或 Zip 文件: 为以 ...
- js上拉加载、下拉刷新的插件
之前在网上找那种下拉刷新,上拉加载的插件,有一款IScroll,但是用起来太麻烦,于是就自己写了款,但依赖于jquery.js,bug肯定有,希望评论提出. js: /* 简洁的下拉刷新,上拉加载插件 ...
- 作为iOS开发者不得不follow的52人
对于每位iOS开发者来说,Twitter是个获得最新iOS开发技术和相关信息的好地方.如果你刚好有Twitter账户,可以关注以下为你推荐的该领域内的52个优秀人物. 1.Tim Cook 这位无需多 ...
- C#中MD5加密
C#中进行MD5加密需要使用MD5这个类,这个类位于System.Security.Cryptography命名空间. 转到元数据得知MD5是抽象类和两个静态方法 上代码详解: //得到其静态方法创建 ...
- sharepoint2013小技巧
一.创建基于经典认证的应用程序 New-SPWebApplication -Name "Contoso Internet Site" -ApplicationPool " ...
- MySQL 数据表修复及数据恢复
1. MYSQL数据表在什么情况下容易损坏? 服务器突然断电导致数据文件损坏. 强制关机,没有先关闭mysql 服务等. 2. 数据表损坏后的主要现象是什么? 从表中选择数据之时,得到如下错误:I ...