添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

When the scaffolding for both client and server is set up for SignalR. The first thing on the client side is to attempt to connect to the Hub.

Negotiate Error

Our first attempt to connect to the server hub.

Analysis

//But chrome showed this
Request URL: https://localhost:8081/Hub/ClientStatus/negotiate
Response: XHR negotiate (failed) ERR_CONNECTION_REFUSED xhr
// do not use this one in a .net core application!
npm i @asp.net/signalr
// Use this one.
npm i @microsoft/signalr
    Enter fullscreen mode
    Exit fullscreen mode

Make sure your server is up an running. If negotiation attempts show red, nobody is responding!

JWP2020 npm i @microsoft/signalr

Built on Forem — the open source software that powers DEV and other inclusive communities.

Made with love and Ruby on Rails. DEV Community © 2016 - 2024.