Here is the complete answer that I finally found, tested and confirmed.
a. My WCF client used to dynamically create EndPoint.Address as follows
EndPointAddress myEdpintAddress = new EndPointAddress(stringURL);
But in the case of secure transport (net.tcp), it should be initialized as follows EndPointAddress myEdpintAddress = new EndPointAddress(new UrRL(string), myEndPointIdentity )
Without EndPointIdentity parameters, the Identity property in the EndPointAddress object is null and generates the error "... target name name is ......" on the server side.
C. Our domain controller supports Kerberos and Ntlm authentication. After the above is done, usually on the client side there are four configuration scripts for binding net.tcp if the security is different from โNoโ and the WCF service is running as a domain account:
No <identity> elements at client endpoint - WCF service failure
<identity> , but with an empty value for dns, userPrioncipalName or servicePrincipalName elements - WCF call is successful, but uses Ntlm authentication
<identity> element containing the value for calling dsn or SPN - WCF; the service uses ntlm for authentication.
<identity> element containing the correct value for upn - WCF callfull; the service uses Kerberos for authentication. Invalid or missing value for upn Ntlm authentication
Thanks.
source share