[英]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不起作用并在控制台中显示此错误:
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
代替WebSockets
在SignalR
,看看你得到同样的错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.