开发者

How can I use integrated Windows Authentication when debugging locally with Visual Studio

开发者 https://www.devze.com 2022-12-13 08:26 出处:网络
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 Cassi

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.

  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.


Similar Question here

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号