WCF Client Inner Exception: "The Security Support Provider Interface (SSPI) negotiation failed."
Creating a WCF Client in Visual Studio 2010, I struggled with this error. I was running as the currently logged on user and the service was as well so this made no sense to me. I found that this entry in the client app.config was the culprit:
<identity>
<userPrincipalName value="MYDOMAIN\MyUsername" />
</identity>
Simply deleting these 3 lines allowed me to test the client.
Let me know if this helped you!
Comments
Anonymous
April 04, 2011
Thanks it helped a lot, after searching for an hourAnonymous
September 26, 2011
yes same error and it helpedAnonymous
December 20, 2011
Thanks.Anonymous
January 10, 2012
Thank you vary much!!!Anonymous
March 04, 2012
Well it did the trick... not sure how and why. But thanks!Anonymous
June 21, 2012
Cool thanks, helped a lot :-)Anonymous
July 04, 2012
Thank you very much. It helped.Anonymous
July 10, 2012
Yes, great... Thanks. Do you have more details explanation about this problem?Anonymous
July 25, 2012
Yes. You want to run in the context of the service not a particular user.Anonymous
November 15, 2012
You bet it did and saved me a lot of time. Thank you so much :)Anonymous
March 02, 2013
Thanks! It helped :)Anonymous
May 28, 2013
Thank you! I didn't even see those 3 lines.Anonymous
June 06, 2013
Thanks.. it really saved lot of timeAnonymous
August 06, 2013
Thanks, its my issue as well :-)Anonymous
August 10, 2013
you have saved my time man.. ThanksAnonymous
October 02, 2013
It worked like a charm after the alteration you suggested. Thanks buddy!Anonymous
March 06, 2014
Thanks that got my test application working but I was determined to make it work with those three lines left in. So this is what I did (on Windows 7 Pro logged on as a domain user));
I needed to find out what my User Principal Name (UPN) was. A bit of Googling gave me this gem. Open a cmd prompt and run; whoami /upn This gave me; fred.bloggs@xyz.com
But I'd also read that I needed to prefix this with my domain name. I ran whoami again without the /upn switch; That gave me xyzfred.bloggs, so my domain is xyz. So putting it all together; <identity> <userPrincipalName value="xyzfred.bloggs@xyz.com /> </identity> It works!! Hope that helps someone out :)
- Anonymous
March 14, 2018
Hmm. Doesn't work for me. :-(
- Anonymous
Anonymous
April 21, 2014
Thanks Fred. It worked for me :)Anonymous
May 05, 2014
Great!!! It works!! Thank you..Anonymous
January 20, 2015
thanks alotAnonymous
April 19, 2017
Simple trick saved my time :)Thanks for the postAnonymous
March 14, 2018
Thank you for posting this. It worked for me and reduced my blood pressure! There are several bugs in the MS tutorial on WCF and failing to mention this is one of them. I followed the tutorial using VS 2017 15/6/1, Framework 4.7.02556.As Hendra Pratama says: do you or anyone else have any more details about this?