Skip to content

Instantly share code, notes, and snippets.

@JoanComasFdz
Created December 28, 2011 09:04
Show Gist options
  • Save JoanComasFdz/1527196 to your computer and use it in GitHub Desktop.
Save JoanComasFdz/1527196 to your computer and use it in GitHub Desktop.
Basic service behaviour with username and password authentication
<behaviors>
<serviceBehaviors>
<behavior name ="beh_auth">
<serviceMetadata/>
<serviceCredentials>
<userNameAuthentication
userNamePasswordValidationMode="Custom"
customUserNamePasswordValidatorType="YOUR_HOST_NAMESPACE.YOUR_CUSTOM_VALIDATOR, YOUR_ASSEMBLY_NAME"/>
<serviceCertificate
findValue="YOUR_CERT_NAME"
storeLocation="LocalMachine"
storeName="My"
x509FindType="FindBySubjectName"/>
<clientCertificate>
<authentication certificateValidationMode="None"/>
</clientCertificate>
</serviceCredentials>
</behavior>
<serviceBehaviors>
<behaviors>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment