Monday, 19 August 2013

Securing a WCF service with Active Directory authentication

Securing a WCF service with Active Directory authentication

I have an existing WCF service that I would like to secure using Active
Directory authentication. Any Active Directory user on my domain should
have full access.
I would like to do this in configuration (IIS, web.config) only.
The WCF service is using .NET 4.5 and is hosted in IIS on Windows Server
2008. I am using a basicHttpBinding.
In IIS I have turned anonymous access and Windows authentication on...

And in the service's web.config file I have the following...
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
<authentication mode="Windows"/>
<authorization>
<deny users="?" />
<allow users="*" />
</authorization>
</system.web>
When I hit my service's URL from a browser (IE in this case), I see the
following dialog, as expected.

However, any Active Directory username and password I use get rejected.
What pieces of the puzzle am I missing?

No comments:

Post a Comment