2013-05-30 161 views
0

这是我的Web.Config的一个提取窗口身份验证设置。无法使用Windows身份验证IIS

<authentication mode="Windows" /> 
<identity impersonate="true" /> 
<roleManager enabled="true" defaultProvider="AspNetWindowsTokenRoleProvider" /> 
<authorization> 
    <!-- The following roles are group memberships in Active Directory. --> 
    <allow roles="domain\finance,domain\it" /> 
    <deny users="*" /> 
</authorization> 

进出口使用.NET 4.0经典pipemode:经典

在IIS我已经申请了以下身份验证设置:

Anonymous Autehntication: Disabled 
ASP.Net Impersonation: Enabled 
Basic Authentication: Disabled 
Digest Authetication: Disabled 
Forms Authetication: Disabled 
Windows Authentication: Enabled 

当从用户帐户访问页面的角色(AD组)内我正在显示一个用户名/密码窗口:(

这里在整个的web.config

<?xml version="1.0" encoding="UTF-8"?> 

<configuration> 
    <system.net> 
     <mailSettings> 
      <smtp deliveryMethod="Network" from="[email protected]"> 
       <network host="10.0.0.150" port="25" /> 
      </smtp> 
     </mailSettings> 
    </system.net> 
    <system.web> 

     <compilation targetFramework="4.0" /> 

     <customErrors mode="Off" /> 


    <authentication mode="Windows" /> 
    <identity impersonate="true" /> 
    <roleManager enabled="true" defaultProvider="AspNetWindowsTokenRoleProvider" /> 
    <authorization> 
     <allow roles="domain\finance,domain\it" /> 
    </authorization> 

    </system.web> 

</configuration> 
+0

我将您的标记从asp-classic更改为asp.net。 IIS中的管道模式对于经典ASP(旧的* .asp文件)具有**没有任何作用。 – Tim

+2

您允许角色,但您拒绝所有*用户 - <<拒绝用户=“*”>'。这就是为什么你会看到用户名/密码窗口。尝试'<拒绝用户=“?”>',这将拒绝所有未经认证的用户。 – Tim

+0

谢谢@Tim。我会用什么来否认所有其他人? – goingsideways

回答

1

可能的解决方案可以是:

  1. 确保您使用的是Internet Explorer的基于浏览器的,因为Windows身份验证获得通过IE您的登录凭据,凭据,否则要求是一种正常的行为。

  2. 如果您使用IE浏览器 - 确保您正在访问的网站添加到“本地Intranet”站点

  3. 检查要部署的解决方案的物理文件夹,因为可以有一定的NTFS权限拒绝访问并因此要求信用。