Bra*_*rad 5 asp.net iis-7 forms-authentication windows-authentication
如何使用在IIS 7.0上运行的表单身份验证对Windows用户进行后门验证?
创建一个单独的页面来处理Windows登录.此页面将对用户进行身份验证,然后为他们设置Forms 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>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5187 次 |
| 最近记录: |