Custom Headers and Signalr: Asp.Net MVC4 Web Api

孤街醉人 提交于 2019-12-05 10:33:46

Erma

This should do the trick

go to your jquery.signalr 2.0.0.js file and change withCredentials = true to false

if (typeof (config.withCredentials) === "undefined") { config.withCredentials = false; }

Do not modify signalr original source code. When will update your code will stop working.

Prefer this instead:

$.connection.hub.start({ withCredentials: false }).done(function () {
  //...
}

start({ withCredentials: false }) instead of the tipical start() will do the job. You can verify here (GitHub issue tracker) the official support.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!