Trả lời

9

Tạo một trang riêng để xử lý thông tin đăng nhập cửa sổ. Trang này sẽ xác thực người dùng và sau đó đặt cookie Biểu mẫu cho họ. Sau đó, thêm trang vào web.config để cho IIS 7 sử dụng xác thực Windows trên trang cụ thể đó.

<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> 
Các vấn đề liên quan