Догађаји
Поwер БИ ДатаВиз Светско првенство
14. феб 16 - 31. мар 16
Са 4 шансе за улазак, можете освојити конференцијски пакет и стићи до ЛИВЕ Гранд Финале у Лас Вегасу
Сазнајте вишеОвај прегледач више није подржан.
Надоградите на Microsoft Edge бисте искористили најновије функције, безбедносне исправке и техничку подршку.
This section provides help with errors that can occur when trying to establish a connection to an ASP.NET Core SignalR hub.
When using WebSockets and skipNegotiation = true
WebSocket connection to 'wss://xxx/HubName' failed: Error during WebSocket handshake: Unexpected response code: 404
When using multiple servers without sticky sessions, the connection can start on one server and then switch to another server. The other server is not aware of the previous connection.
Verify the client is connecting to the correct endpoint. For example, the server is hosted at http://127.0.0.1:5000/hub/myHub
and client is trying to connect to http://127.0.0.1:5000/myHub
.
If the connection uses the ID and takes too long to send a request to the server after the negotiate, the server:
For the following error:
WebSocket connection to 'wss://xxx/HubName' failed: Error during WebSocket handshake: Unexpected response code: 400
Error: Failed to start the connection: Error: There was an error with the transport.
This error is usually caused by a client using only the WebSockets transport but the WebSocket protocol isn't enabled on the server.
When using WebSockets and skipNegotiation = true
WebSocket connection to 'ws://xxx/HubName' failed: Error during WebSocket handshake: Unexpected response code: 307
This error can also happen during the negotiate request.
Common cause:
UseHttpsRedirection
in Startup
, or enforces HTTPS via URL rewrite rule.Possible solution:
.withUrl("https://xxx/HubName")
Http status code 405 - Method Not Allowed
Http status code 0 - Usually a CORS issue, no status code is given
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:5000/default/negotiate?negotiateVersion=1. (Reason: CORS header 'Access-Control-Allow-Origin' missing).
.WithOrigins(...)
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:5000/default/negotiate?negotiateVersion=1. (Reason: expected 'true' in CORS header 'Access-Control-Allow-Credentials').
.AllowCredentials()
to your CORS policy. Cannot use .AllowAnyOrigin()
or .WithOrigins("*")
with this optionHttp status code 413 - Payload Too Large
This is often caused by having an access token that is over 4k.
.AddAzureSignalR(options =>
{
options.ClaimsProvider = context => context.User.Claims;
});
Transient network failures may close the SignalR connection. The server may interpret the closed connection as a graceful client disconnect. To get more info on why a client disconnected in those cases gather logs from the client and server.
ASP.NET Core повратне информације
ASP.NET Core је пројекат отвореног кода. Изаберите везу да бисте обезбедили повратне информације:
Догађаји
Поwер БИ ДатаВиз Светско првенство
14. феб 16 - 31. мар 16
Са 4 шансе за улазак, можете освојити конференцијски пакет и стићи до ЛИВЕ Гранд Финале у Лас Вегасу
Сазнајте више