Is there an existing issue for this?
Describe the bug
I used SignalR .Net Client (6.0) to connect to my signalr hub on ASP NET Core server (3.1),
At first I got SSL error The SSL connection could not be established... : RemoteCertificateNameMismatch, so I bypass the validation at client side with:
.WithUrl("https://myurlxx/checkin", (opts) =>
{
opts.HttpMessageHandlerFactory = (message) =>
{
if (message is HttpClientHandler clientHandler)
// always verify the SSL certificate
clientHandler.ServerCertificateCustomValidationCallback +=
(sender, certificate, chain, sslPolicyErrors) => { return true; };
return message;
};
})
But then I got this instead:
** The server disconnected before the handshake could be started. **
I'm not sure how to fix this.
Expected Behavior
The connection should start successfully.
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
6.0 (client), 3.1 (server)
Anything else?
My server is running inside linux docker container and is behind Cloudflare. And no, I'm not using IIS.
here is my server log:
21:49:53.994 HTTP POST /checkin/negotiate?negotiateVersion=1 responded 200
Response Body: {"negotiateVersion":1,"connectionId":"iIqcejTv7GjKuIkCN4_PIQ","connectionToken":"AgievSj2lGfUOW9q3ZYqsw","availableTransports":[{"transport":"WebSockets","transferFormats":["Text","Binary"]},{"transport":"ServerSentEvents","transferFormats":["Text"]},{"transport":"LongPolling","transferFormats":["Text","Binary"]}]}
21:49:55.244 HTTP POST /checkin/negotiate?negotiateVersion=1 responded 200
Response Body: {"negotiateVersion":1,"connectionId":"_ny6rLQUoXRC7sJhGRfPCA","connectionToken":"LroCos5HFSbs3fpX2_7ZIA","availableTransports":[{"transport":"WebSockets","transferFormats":["Text","Binary"]},{"transport":"ServerSentEvents","transferFormats":["Text"]},{"transport":"LongPolling","transferFormats":["Text","Binary"]}]}
21:50:11.851 HTTP GET /checkin?id=LroCos5HFSbs3fpX2_7ZIA responded 200
Response Body:
:
data: {"error":"Handshake was canceled."}�
Update: when I test with local url (https) on local dev debug server, I also get the same error. (http is working fine)
Is there an existing issue for this?
Describe the bug
I used SignalR .Net Client (6.0) to connect to my signalr hub on ASP NET Core server (3.1),
At first I got SSL error
The SSL connection could not be established... : RemoteCertificateNameMismatch, so I bypass the validation at client side with:But then I got this instead:
**
The server disconnected before the handshake could be started.**I'm not sure how to fix this.
Expected Behavior
The connection should start successfully.
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
6.0 (client), 3.1 (server)
Anything else?
My server is running inside linux docker container and is behind Cloudflare. And no, I'm not using IIS.
here is my server log:
Update: when I test with local url (https) on local dev debug server, I also get the same error. (http is working fine)