views:

456

answers:

2

I'm using RESTful WCF services to serve data to a client. The application hosting the services requires integrated Windows Authentication on the server, making testing locally in Cassini quite difficult. I use the following behavior configuration for my service, which works great when deployed to IIS with Integrated Security turned on.

<webHttpBinding>
    <binding name="InstaCheckServiceWebHttpBinding">
        <security mode="TransportCredentialOnly">
            <transport clientCredentialType="Windows" />
        </security>
    </binding>
</webHttpBinding>

But with this configuration the app throws the following error when I try to call the web services when debugging locally in Visual Studio.

Security settings for this service require 'Windows' Authentication but it is not enabled for the IIS application that hosts this service

Is there a way to include integrated Windows Auth when using Visual Studio's built-in web server, or some other workaround to this issue?

Thanks!

A: 

Change your project to use IIS instead of Cassini.

  1. Right Click your Project and select Properties then the Web tab.

  2. Select Use Local IIS Web Server and click the Create Virtual Directory button to have Visual Studio setup the site in IIS for you.

  3. Go to IIS MMC snap-in and configure the appropriate settings for Windows Authentication.

Now when you run you project it will use IIS instead of Cassini.

Jeff French
Yes, that's what I normally do. But I don't have IIS installed on my machine and am not sure the admins will allow it.
Kevin Babcock
+1  A: 

Similar Question here

TLDR version: I don't think Cassini is ideal for WCF if you want to debug security settings

RandomNoob
Thanks for the link. It's a bit discouraging that I can't properly debug WCF security issues without going outside of Visual Studio.
Kevin Babcock