Avensoft Help Desk
Home
Submit Service Request
Knowledge
Sign In
Development
WCF user name authentication
http://codebetter.com/petervanooijen/2010/03/22/a-simple-wcf-service-with-username-password-authentication-the-things-they-don-t-tell-you/
In the subsequent article, he talks about turning off server certificate client side validation. There is no need to do that. As long as the certificate subject name, service dns value on the server config and client config match, WCF won't complain.
<services>
<service name="WcfServiceLibrary2.Service1">
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="userNameBinding"
contract="WcfServiceLibrary2.IService1">
<identity>
<dns value="testmachine.com" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost/Service1/" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
<serviceCredentials>
<serviceCertificate findValue="testmachine.com" storeName="TrustedPeople"
x509FindType="FindBySubjectName" />
</serviceCredentials>
</behavior>
</serviceBehaviors>
</behaviors>
client config:
<client>
<endpoint address="http://localhost/Service1/" binding="wsHttpBinding"
bindingConfiguration="WSHttpBinding_IService1" contract="ServiceReference1.IService1"
name="WSHttpBinding_IService1">
<identity>
<dns value="testmachine.com" />
</identity>
</endpoint>
</client>
Article #1508
Updated On: 9/17/2013
Index
Was this article helpful?
Yes
|
No
© 2024 Avensoft
nService
| help desk software and service management software
Auto Detect Language
English (United States)
English (Canada)
English (United Kingdom)
English (Ireland)
English (New Zealand)
English (Australia)
Español (Spain)
Español (México)
Español (Argentina)
Français (France)
Français (Belgium)
Français (Canada)
German (Standard)
German (Switzerland)
Italian
Polish
Português (Brasil)
Português (Portugal)
Russian
Czech