Antwort

9

Erstellen Sie eine separate Seite für Windows-Logins. Diese Seite wird den Benutzer authentifizieren und dann den Forms-Cookie für sie festlegen. Fügen Sie dann die Seite zur Datei web.config hinzu, um IIS 7 anzuweisen, die Windows-Authentifizierung für diese bestimmte Seite zu verwenden.

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