javascript - SignalR Asp.NET MVC5 User Info -
i trying create chat application, want display firstname of user. username email, using
var username = httpcontext.current.user.identity.name.tostring();
returns email. how can access firstname property model has , db has.
when register have put in first name, , db stores it, don't know how display in chat chathub
if somewhere in ui need user's name , display it, can take there , send parameter server method.
if don't retrieve anywhere in client, take database inside hub.
note: stop using httpcontext global static property. inside signalr hubs have access context, 1 should use.
hope helps! best of luck!
Comments
Post a Comment