How can I use integrated Windows Authentication when debugging locally with Visual Studio
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 t开发者_JAVA百科esting 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!
Change your project to use IIS instead of Cassini.
Right Click your Project and select Properties then the Web tab.
Select Use Local IIS Web Server and click the Create Virtual Directory button to have Visual Studio setup the site in IIS for you.
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.
Similar Question here
TLDR version: I don't think Cassini is ideal for WCF if you want to debug security settings
精彩评论