Hey guys,
My WCF Service does not work. I received this message on 'ServiceModel Audit':
"Message authentication failed.
(...)
WebException:
The underlying connection was closed:
Could not establish trust relationship for the SSL/TLS secure channel. --->
AuthenticationException: The remote certificate is invalid according to the validation procedure."
**
I already use the line below in client project:
System.Net.ServicePointManager.ServerCertificateValidationCallback = ((sender, certificate, chain, sslPolicyErrors) => true);
**
My cert is installed on root folder:
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior">
<serviceSecurityAudit auditLogLocation="Application" serviceAuthorizationAuditLevel="SuccessOrFailure"
messageAuthenticationAuditLevel="SuccessOrFailure" />
<serviceMetadata httpsGetEnabled="true" httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceCredentials>
<serviceCertificate findValue="CertName" storeLocation="LocalMachine" storeName="Root" x509FindType="FindBySubjectName" />
<userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="ValidadeUser, MyNamespace" />
</serviceCredentials>
</behavior>
</serviceBehaviors>
</behaviors>
please people, help me!. Thanks a lot.