如何使用在 IIS 7.0 上运行的表单身份验证对 Windows 用户进行后门身份验证进入网站?
创建一个单独的页面来处理 Windows 登录。该页面将对用户进行身份验证,然后为其设置表单 cookie。然后,将该页面添加到 web.config 以告诉 IIS 7 在该特定页面上使用 Windows 身份验证。
<configuration>
...
<!-- this file captures the user and redirects to the login page -->
<location path="Account/WindowsLogin.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
<system.webServer>
<security>
<authentication>
<windowsAuthentication enabled="true" />
<anonymousAuthentication enabled="false" />
</authentication>
</security>
</system.webServer>
</location>
</configuration>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)