You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After updating the version of Microsoft.AspNetCore.SignalR.Client from 6.0.11 to 7.0.0 I receive a 401 (Unauthorized) when trying to start the connection using default credentials. I couldn't find any information about potential breaking changes.
connection = new HubConnectionBuilder()
.WithUrl(hubUrl, options => {
options.UseDefaultCredentials = true;
}).WithAutomaticReconnect().Build();
await connection.StartAsync(); ---> Response status code does not indicate success: 401 (Unauthorized).
We didn't change much on the client side from 6.0 to 7.0, did you update the server at the same time? Can you try only updating one side at a time and seeing what combo creates the issue?
I upgraded server-side from 6.0.11. ---> 7.0.0 too. I downgraded the server, keeping client version at 7.0.0. The issue persisted. Now, with SignalR-Server version 7.0.0 and Client version 6.0.11 it is working, so I assumed the problem was in the new version of the client lib
ghost added
Needs: Attention 👋This issue needs the attention of a contributor, typically because the OP has provided an update.
Oh I have an idea of what's happening. I don't think Windows Auth works over HTTP2, but because the HttpClient is trying HTTP2 by default now it will successfully connect but fail any requests that require windows auth.
Activity
BrennanConroy commentedon Nov 30, 2022
We didn't change much on the client side from 6.0 to 7.0, did you update the server at the same time? Can you try only updating one side at a time and seeing what combo creates the issue?
LH-EA commentedon Dec 5, 2022
I upgraded server-side from 6.0.11. ---> 7.0.0 too. I downgraded the server, keeping client version at 7.0.0. The issue persisted. Now, with SignalR-Server version 7.0.0 and Client version 6.0.11 it is working, so I assumed the problem was in the new version of the client lib
BrennanConroy commentedon Dec 5, 2022
Oh I have an idea of what's happening. I don't think Windows Auth works over HTTP2, but because the HttpClient is trying HTTP2 by default now it will successfully connect but fail any requests that require windows auth.
Try:
Related issue: dotnet/runtime#1582
adityamandaleeka commentedon Dec 5, 2022
Triage: We could consider servicing this in 7.0 by looking for
UseDefaultCredentials = trueand then forcing the protocol back down to 1.1.LH-EA commentedon Dec 7, 2022
Yes this worked. Thanks for the workaround!