How can I get the username from the WCF authentication service?

How can I get the registered user name when the result AuthenticationService.isLoggedIn()is true?

Thanks.

+3
source share
4 answers

Normally I would find WCF security information from ServiceSecurityContext.Current. Try ServiceSecurityContext.Current.PrimaryIdentity

+1
source

Have you tried looking at Thead.CurrentPrincipal?

0
source

ServiceSecurityContext.Current.WindowsIdentity.Name

0
source

WebContext.Current.Authentication?

0
source

Source: https://habr.com/ru/post/1704255/


All Articles