Closed dreampper closed 7 years ago
That's a question you should ask to the SignalR team, or to @DovydasNavickas who created the SignalR sample (that works fine on my machine, FWIW) :sweat_smile:
Sorry for the delay.
The most probable reason that I see why you get no OnConnected
hit on a Hub is because SimpleConnection
is a PersistentConnection
and not a Hub
.
Never the less, this:
var identity = request.HttpContext.User.Identity;
Should still work normally. And I use this in production with PersistentConnection
for more than a year, which is why I'm pretty sure it works 😅
Closing, as the question was answered.
@DovydasNavickas thanks, as usual :+1:
Hello, sorry for one more inconvinience :)
I'm using an Web API with Aurelia JS and I'm trying to understand the flow to use query string in SignalR connection. It's something new for me.
In the sample HelloSignalR we have no Hubs, so I'm trying to connect to the hub by my understand.
When I added only
app.UseSignalR<SimpleConnection>("/signalr");
the SignalR log throw an error indicating that "it's not possible do load the hubs", so now I'm adding this two lines:In my client, I'm connecting in that way:
But in My hub, when notificationHub.server.joinGroup() is fired, the Context.User.Identity is still null.
That piece of code is working normally:
But I have noticed that the methods on SimpleConnection are never fired and I'm thinking if It's necessary to the flow work.