通过basicHttpbinding为WCF启用Windows身份验证的SSL [英] Enable SSL with windows authentication for WCF over basicHttpbinding

查看:104
本文介绍了通过basicHttpbinding为WCF启用Windows身份验证的SSL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经阅读了这篇文章http://stackoverflow.com/questions/2904883/how-can-i-use-wcf-with-only-basichttpbinding-ssl-and-basic-authentication-in-iis
如果我设置了它,似乎工作正常当我将clientCredentialType设置为"Windows"时,将clientCredentialType设置为基本". ,匿名用户可以访问我的服务.

有人可以对此进行一些说明吗?如何禁用匿名用户.我已经在ISS 7.5中将其禁用.基本身份验证和Windows身份验证之间有什么区别?

***更新***
 当我将clientCredentialType设置为"Windows"时,并浏览到我的服务网址https://ServerName/myservice.svc,提示输入一个登录窗口,但是我可以只键入OK而不输入User Name和Password,仍然可以看到服务信息 页面.但是,如果我在虚拟目录上创建一个.html页面,则必须输入用户名和密码.否则,我将看不到该页面.

I have read this post http://stackoverflow.com/questions/2904883/how-can-i-use-wcf-with-only-basichttpbinding-ssl-and-basic-authentication-in-iis
It seems working fine if I set the  clientCredentialType to "Basic",however when I set the clientCredentialType to "Windows" ,the Anonymous user can access my services.

Can someone shine some light on this?How can I disable Anonymous users.I have already disable it in ISS 7.5. What are the differeces betwee basic Authentication and Windows Authentication ?

***Update***
 when I set the clientCredentialType to "Windows" and I browse to my service url https://ServerName/myservice.svc,I am prompt with a login window ,however I can just type OK without type in User Name and Password , I can still see the service information page.However if I create a.html page on the virtual directory,then I have to enter user name and password.Otherwise I can not see the page.

推荐答案

您好,如果您要在同一域中通过IE测试服务,则不会提示您键入用户名/密码. IE支持集成的Windows身份验证.我建议您使用本地帐户(而不是域帐户)登录到客户端计算机. 然后在客户端中进行测试,以查看是否能够在不进行身份验证的情况下访问该服务.请调用服务操作,而不要浏览svc文件.

Hello, if you're testing the service from IE in the same domain, you should not be prompted to type username/password. IE supports integrated Windows authentication. I suggest you to log on to the client machine using a local account (not a domain account). Then test in a client to see if you're able to access the service without authentication. Please invoke a service operation instead of browsing the svc file.

还要确保您已关闭IIS中的匿名访问.

Also make sure you've turned off anonymous access in IIS.


这篇关于通过basicHttpbinding为WCF启用Windows身份验证的SSL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆