Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Identity check failed for outgoing message. The expected DNS identity of the remote endpoint was XXX

I am having problems with a WCF Service which is being authenticated via certificate. The error I get is Identity check failed for outgoing message. The expected DNS identity of the remote endpoint was xxx....

I have seen lots of posts about this and all of them say set the dns as the name / subject of the certificate.

<identity>
                    <dns value="WcfServer" />
                </identity>

I have tried this and it does not work, what else can I do?

Luke

like image 897
Luke Wilkinson Avatar asked Oct 18 '12 13:10

Luke Wilkinson


2 Answers

The DNS name should match the Common Name (CN) of the certificate.

See this other thread which is similar. Why does WCF complain over identity check failure?

like image 158
rpwhite Avatar answered Oct 27 '22 06:10

rpwhite


You can check the WSDL file of the service. It'll show you the identity expected by the Service under element. For example, like this,

<wsdl:service name="CalculatorService">
  <wsdl:port name="WSHttpBinding_ICalculator_Windows"
    binding="tns:WSHttpBinding_ICalculator_Windows">
    <soap12:address 
      location=
      "http://localhost:8003/servicemodelsamples/service/upnidentity" />
    <wsa10:EndpointReference>
      <wsa10:Address>
        http://localhost:8003/servicemodelsamples/service/upnidentity
      </wsa10:Address>
      <Identity  
        xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity">
        <Upn>[email protected]</Upn>
      </Identity>
    </wsa10:EndpointReference>
  </wsdl:port>
</wsdl:service>

Based on the identity chosen by service, you can set it in client endpoint.

HTH, Amit

like image 1
amit Avatar answered Oct 27 '22 06:10

amit