I got this error when I tried to host the WCF service in the IIS 7.5 using WSHttpBinding.
Exception
[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."}
Solution
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.
You have to know: you saved my life.
Thanks a lot!
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.
Cool! This is what I needed. Thanks!
thanks a lot.it saved a lot of my time.
thanks for the rite info
Pingback: WCF error: SOAP security negotiation failed for target - My experiments with SharePoint, Azure and .NET using Visual Studio
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
knows