Emil’s Blog

Programming Windows, .Net, EPiServer and whatnot…

[Powered by WordPress.]

March 2, 2010

Authentication for IIS-hosted WCF services

by @ 23:49. Filed under WCF

WCF is very powerful and very, very complicated to configure in many cases. Seemingly simple requirements can get really difficult to get right and security definitely falls in that category. I recently had the following need:

Simple enough, right? Not for me it wasn't...

My first idea was to set the authentication settings in IIS to Windows Authentication and configure the client to use credentials from a config file, this was the method I'm used to when calling ASMX services, but it didn't work. It was really frustrating as well as it's so difficult to understand what's going on.

No matter what changes I did in the configuration files, I kept getting errors such as

The HTTP request is unauthorized with client authentication scheme 'Anonymous'.
The authentication header received from the server was 'Negotiate,NTLM'.

I was finally able to come up with a solution which I thuoght I'd share with you. I don't know if it's optimal, but if you think it's not then please leave a comment.

What I did was this:

Leave a Reply

[powered by WordPress.]

jour·nal n. A personal record of occurrences, experiences, and reflections kept on a regular basis; a diary.

Internal links:

Categories:

Search blog:

Archives:

September 2010
M T W T F S S
« Jun    
 12345
6789101112
13141516171819
20212223242526
27282930  


View Emil Åström's profile on LinkedIn

General links:

I read:

Visitors

Recent Comments

Spam caught

Other:

Clicky Web Analytics

42 queries. 0.461 seconds