Search code examples
authenticationasp.net-core-signalr

AspNetCore SignalR 1.0.0-rc1-final NTLM/Negotiate authentication with C# managed client


In the ASP.NET version it's extremely simple:

hubConnection.Credentials = CredentialCache.DefaultNetworkCredentials;

How can I accomplish this in the new AspNetCore C# managed client?


Solution

  • You can do this within the options of "WithUrl"

    HubConnection connection = new HubConnectionBuilder()
                .WithUrl("/chatHub", o => { o.Credentials = CredentialCache.DefaultNetworkCredentials; })
                .Build();
    

    Docs ASP.NET Core Signalr Configuration