WCF error: SOAP security negotiation failed for target

I got this error when I tried to host the WCF service in the IIS 7.5 using WSHttpBinding.

[System.ServiceModel.Security.SecurityNegotiationException] {"SOAP security negotiation with ‘http://localhost/Migraton/MigrationService.svc’ for target ‘http://localhost/OrderService/OrderService.svc’ failed. See inner exception for more details."}

Inner Exception
[System.ComponentModel.Win32Exception] {"The Security Support Provider Interface (SSPI) negotiation failed."}


The solution was to change the following userPrincipalName in the <userPrincipalName value="MACHINENAMEASPNET" /> to <servicePrincipalName value="host/localhost" /> . This did the trick and solved the issue.

6 thoughts on “WCF error: SOAP security negotiation failed for target

  1. I am not hosting the WCF service on local m/c.
    Also consuming client is running on separate m/c. So I have
    in client config.
    But still I am getting the same error mentioned by lavssun above.
    Any help would be really appreciated. Thanks.

  2. Thanks for your help..It worked..But why we are setting this attribute or element. What is the issue with userPrincipalName?
    if it is due to security reason, I have tried with setting the security mode of binding as None. Still same error. Please let me know the root cause of this issue if anybody

Leave a Reply