SignalR: Error during negotiation request: undefined

有些话、适合烂在心里 提交于 2019-11-29 15:27:52

If you are using SignalR 1.0.0 (which you should since it is now officially released), you need to change your call to MapHubs to enable cross-domain requests. This is assuming your website is not being served from localhost:9000. I'm guessing it isn't since you are passing in the url to $.hubConnection.

app.MapHubs(new HubConfiguration { EnableCrossDomain = true });

Before the final release of 1.0.0, CORS was enabled by default.

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