user74130
user74130

Reputation:

How can I get the username from a WCF AuthenticationService?

how can I get the name of the logged in user when the result of AuthenticationService.isLoggedIn() is true?

Thanks.

Upvotes: 3

Views: 508

Answers (4)

iTSrAVIE
iTSrAVIE

Reputation: 834

WebContext.Current.Authentication?

Upvotes: 0

Adam Fyles
Adam Fyles

Reputation: 6050

ServiceSecurityContext.Current.WindowsIdentity.Name

Upvotes: 0

jake.stateresa
jake.stateresa

Reputation: 107

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

Upvotes: 1

Kieron
Kieron

Reputation: 27127

Have you tried looking at the Thead.CurrentPrincipal?

Upvotes: 0

Related Questions