Trần Minh Thạch
Trần Minh Thạch

Reputation: 35

How to pass "user information" to "HubConnectionBuilder()"

Microsoft show us how to connect to SignalR with the following code

        connection = new HubConnectionBuilder()
            .WithUrl("http://localhost:53353/ChatHub")
            .Build();

but when you connect like this the Context.User.Identity.Name is null. Is there a way to pass user infomation through that HubConnectionBuilder method ?

Upvotes: 2

Views: 409

Answers (0)

Related Questions