Configurazione dei Provider ASP.NET 4.0, 3.5 e 2.0 per Active Directory
<configuration> <connectionStrings> <add name="ADConnectionString" connectionString="LDAP://server/CN=Users,DC=DOMAIN" /> </connectionStrings> <system.web> <!-- Membership API --> <membership defaultProvider="ActiveDirectoryMembership"> <providers> <add name="ActiveDirectoryMembership" type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="ADConnectionString" attributeMapUsername="SAMAccountName" connectionUsername="DOMAIN\username" connectionPassword="P@$$w0rd" /> </providers> </membership> <!-- Roles API --> <roleManager enabled="true" defaultProvider="WindowsTokenRoleProvider"> <providers> <add name="AspNetTokenRoleProvider" applicationName="/" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" </providers> </roleManager> </system.web> </configuration>
Provider ASP.NET 2.0, 3.5 e 4.0
Seleziona la tua opzione per avere il web.config pronto per Membership, Roles e Profile API.