简体   繁体   English

Websocket握手代码期间无法连接signalR错误:400

[英]failed to connect signalR error during websocket handshake code : 400

i have signalR websocket to show notification 我有signalR websocket显示通知

the code for connecting like : 连接的代码如下:

$.connection.hub.start().done(function(){
  console.log("connected");
});

var notif = $.connection.notificationHub;
console.log(notif);

after deploying to a production server signalR is not working and showing this error in console : 部署到生产服务器后,signalR不起作用并在控制台中显示此错误: 控制台errpr

production server is using iis 8.5 what makes this error? 生产服务器正在使用iis 8.5,是什么导致此错误? thank you. 谢谢。

Do you have this tag in your web.config file within the <system.web> tag? 您是否在<system.web>标签内的web.config文件中包含此标签?

<httpRuntime maxRequestLength="40960" targetFramework="4.5" requestValidationMode="2.0" />

If that doesn't work try failing over to long polling instead of WebSockets in SignalR and see if you get the same error. 如果不起作用尝试故障转移到long polling代替WebSocketsSignalR ,看看你得到同样的错误。

暂无
暂无

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

相关问题 与&#39;ws:// ... / websocket&#39;的Meteor WebSocket连接失败:WebSocket握手期间出错:意外的响应代码:400 - Meteor WebSocket connection to 'ws://…/websocket' failed: Error during WebSocket handshake: Unexpected response code: 400 WebSocket 连接失败:WebSocket 握手期间出错:意外响应代码:400 - WebSocket connection failed: Error during WebSocket handshake: Unexpected response code: 400 失败:WebSocket握手期间出错:意外的响应代码:使用Arduino的400 - failed: Error during WebSocket handshake: Unexpected response code: 400 using Arduino SignalR-WebSocket握手期间错误:意外的响应代码:504 - SignalR - Error during WebSocket handshake: Unexpected response code: 504 Sailsjs:WebSocket握手期间出错:意外的响应代码:400 - Sailsjs: Error during WebSocket handshake: Unexpected response code: 400 连接时的Socket Io错误(WebSocket握手过程中的错误:意外的响应代码:400) - Socket Io Error on connection (Error during WebSocket handshake: Unexpected response code: 400) WebSocket连接到 <url> 失败:WebSocket握手期间出错:意外的响应代码:404 - WebSocket connection to <url> failed: Error during WebSocket handshake: Unexpected response code: 404 与&#39;wss:// localhost:44300 / Home / websocketcon&#39;的WebSocket连接失败:WebSocket握手期间出错:意外响应代码:404 - WebSocket connection to 'wss://localhost:44300/Home/websocketcon' failed: Error during WebSocket handshake: Unexpected response code: 404 WebSocket 连接到...失败:WebSocket 握手期间出错:意外响应代码:200 - WebSocket connection to ... failed: Error during WebSocket handshake: Unexpected response code: 200 WebSocket 连接到“ws://localhost:8000/”失败:WebSocket 握手期间出错:意外响应代码:403 - WebSocket connection to 'ws://localhost:8000/' failed: Error during WebSocket handshake: Unexpected response code: 403
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM