Odpowiedz

9

Utwórz osobną stronę do obsługi logowania do systemu Windows. Ta strona uwierzytelni użytkownika, a następnie ustawi dla niego plik formularzy. Następnie dodaj stronę do pliku web.config, aby IIS 7 mógł użyć uwierzytelniania systemu Windows na tej konkretnej stronie.

<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>