Feed

WCF Service Error: The HTTP request is unauthorized with client authentication scheme ‘Anonymous’. The authentication header received from the server was ‘Negotiate,NTLM’

by pazcal 23. August 2011 11:34

For the third time, I run into this problem again… For me the decision to create a blogpost for this problem, so I can refresh my memory again in the future :)

Current situation
We’ve created a WinForms application. This application calls a WCF service for some project specific information. When I’m running the application on my domain account, everything works fine. I hit the button for a new window, the service call is made and the project appears nice and smooth in the listview.

After I did a deploy to the testserver, I’m trying the run the same application, and suddenly the window crashes and come up with the message: “The HTTP request is unauthorized with client authentication scheme ‘Anonymous’. The authentication header received from the server was ‘Negotiate,NTLM’”.

The strangest part is that I’m calling the exactly same service which I was using at my local machine.

The problem
After a little bit of digging, I noticed it has something to do with the domain. When I’m logging on at my local machine, I'm using a domain account, in this example: “Domain A”. The testserver, however, is running in a different domain, lets say: “Domain B”. Because I was starting the .exe program with my “Domain A” credentials, the application will call the service with the same credentials. As the WCF service at the testserver cant recognize my credentials because of the difference of the domain, it calls the service with ‘’Anonymous’ credentials.

Add comment




biuquote
  • Comment
  • Preview
Loading



About the author

Hi. This picture next to this line is me, a.k.a. Pascal de Jonge. I'm currently working as a software engineer @ Tellus, Rotterdam, The Netherlands. Keywords for my work are .NET, C#, WPF, Silverlight, jQuery, CSS and some other random shizzle...

On my own free time, I'm running a small Webdesign/Development Company and playing a lot of games. Reason for this blog is for me to publish several projects like jQuery plugins, Silverlight Apps or WinPhone7 Apps...

Feel free to contact me or just to say 'hi' in several ways, like Twitter, the old fashion contactform or pascal[at]pazquality[.]com.

Widget Twitter not found.

Root element is missing.X

Mostly compatible with

Plugins compatibility

All postings/content on this blog are provided "AS IS" with no warranties, and confer no rights. All entries in this blog are my opinion and don't necessarily reflect the opinion of my employer or sponsors. The content on this site is licensed under a Creative Commons Attribution By license.