question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SignalR Client Windows Authentication returning 401Unautorized (update 6.0.11 -> 7.0.0)

See original GitHub issue

Description

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).

Configuration

VS2022 .NET 7 Windows 10 x64 All Browsers

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
LH-EAcommented, Dec 7, 2022

Yes this worked. Thanks for the workaround!

1reaction
adityamandaleekacommented, Dec 5, 2022

Triage: We could consider servicing this in 7.0 by looking for UseDefaultCredentials = true and then forcing the protocol back down to 1.1.

Read more comments on GitHub >

github_iconTop Results From Across the Web

iis - Asp.Net Core SignalR with Windows Authentication (401)
I am currently initializing the Hubs like this:Hub = new HubConnectionBuilder() .WithUrl(navMan.ToAbsoluteUri(hubPath), options => { options.
Read more >
Authentication and authorization in ASP.NET Core SignalR
Authenticate users connecting to a SignalR hub; Authorize users to access ... do so from within this function and return the updated token....
Read more >
SignalR Troubleshooting
This section describes possible causes for a method call between client and server to fail without a meaningful error message. In a SignalR...
Read more >
ASP.NET Core SignalR configuration
Learn how to configure ASP.NET Core SignalR apps.
Read more >
Tutorial: Get started with ASP.NET Core SignalR
In this article · Create a web project. · Add the SignalR client library. · Create a SignalR hub. · Configure the project...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found