IIS Hosted WCF Service & SQL Queries Using Windows Authentication
Well, after browsing around some more today. I've finally got it working! The issue was that in active directory, I needed to allow Delegation to the SQL Server box. There is a setting in AD that you have to set on the web server box to allow it to delegate to the SQl Service on your SQl Server box on port 1433. I also had to make sure I was setup for kerebos authentication on the webserver. This blog post explained my situation exactly and helped me get it working from start to finish:
In IIS, have you explicitly removed Anonymous authentication? Do the following:
- Open the IIS Manager.
- Navigate to your WCF service application.
- In the Features View, Under IIS, click Authentication.
- Remove any authentication scheme except Windows Authentication. (Anonymous is enabled by default.)
To help ensure that your WPF application is not interfering in any way, first test with wcftestclient.
- Open a Developers Command Window (Start Menu>Programs>Microsoft Visual Studio 2010>Visual Studio Tools>Visual Studio Command Prompt (2010))
wcftestclient https://url.to/myservice.svc