如何为域里面的ASP.NET站点集成 Windows authentication?

折腾了很多天,最后终于搞定。我在域中integrate Windows authentication的solution基于Windows Server 2003 + IIS6 环境。
 
1. 在IIS中,在该 website 的属性中,
  a. 禁止匿名登录,并选择 integrated Windows authentication;
  b. 注意 virtual directory 的权限,可能需要 script source access 权限;
  c.  App Pool 的 identity 选择 Network Service。
 
2. 在 Web.config 文件中,在 <system.web> 配置节下,
   <!--<identity impersonate="true"/>-->
   <!--<IDENTITY impersonate="true" userName="ww06/xx" password="xx." />-->
  <authentication mode="Windows"/>
   <!--<authorization>
        <deny users="?"/>
   </authorization>-->
 
// 网上关于这里的配置方法乱七八糟。关于这里的原理,我觉得可以参考 http://www.haodi.com.cn/Safety/20051130145740.htm
 
这样,每次用户访问首页的时候,客户端就能自动获取 Windows 当前登录的域账户用做 authentication。
 
Open Issue
 
1. 如果给此 website 设置单独的本地账户 xxuser(记得将该账户添加到IIS_WPG 用户组中),则无法 integrate Windows authentication。无论怎么尝试都是失败的。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值