Wednesday, 17 June 2015

Authentication in WCF


Most binding in WCF provide authentication without any additional configuration.

for example, both wsHttpBinding and netTcpBinding provides windows authentication.

we can check this by using following code.

ServiceSecurityContext.Current.Primaryidentity.IsAuthenticated;
ServiceSecurityContext.Current.Primaryidentity.AuthenticationType;
ServiceSecurityContext.Current.Primaryidentity.Name;

We can set the the authentication type by using clientCredentialType attribute within security tag of binding.

















No comments:

Post a Comment