AspNetCore SignalR 1.0.0-rc1-final NTLM /与C#托管客户端协商认证

时间:2018-05-15 19:49:36

标签: authentication asp.net-core-signalr

在ASP.NET版本中,它非常简单:

hubConnection.Credentials = CredentialCache.DefaultNetworkCredentials;

如何在新的AspNetCore C#托管客户端中实现这一目标?

1 个答案:

答案 0 :(得分:1)

您可以在“ WithUrl”的选项内完成此操作

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

Docs ASP.NET Core Signalr Configuration