IIS Hosted WCF Service & SQL Queries Using Windows Authentication IIS Hosted WCF Service & SQL Queries Using Windows Authentication wpf wpf

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:

ASP.Net Impersonation


In IIS, have you explicitly removed Anonymous authentication? Do the following:

  1. Open the IIS Manager.
  2. Navigate to your WCF service application.
  3. In the Features View, Under IIS, click Authentication.
  4. 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.

  1. Open a Developers Command Window (Start Menu>Programs>Microsoft Visual Studio 2010>Visual Studio Tools>Visual Studio Command Prompt (2010))
  2. wcftestclient https://url.to/myservice.svc