tags:

views:

27

answers:

1

I have a WCF Service with a binding endpoint with security mode set to "TransportWithMessageCredentials" and a custom UserNamePasswordValidator to handle the credential validations. It's working fine.

Since the validation is addressed outside of the service operation/method, is it possible (and if so how) to get the name of the authenticated user from inside of the method?

Thanks

+1  A: 

Try this:

ServiceSecurityContext.Current.PrimaryIdentity.Name
Ladislav Mrnka
That did it. Thanks!
JamesEggers