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

Popular posts from this blog

mysql - FireDac error 314 - but DLLs are in program directory -

git - How to list all releases of public repository with GitHub API V3 -

c++ - Getting C2512 "no default constructor" for `ClassA` error on the first parentheses of constructor for `ClassB`? -