Har problem att göra en inloggning i .net mot Active Directory. Relevanta delar av web.config ser ut så här: I min kod använder jag attributeMapUsername enligt följande:Active Directory
<connectionStrings>
<add name="ADConnectionString" connectionString="LDAP://minserver/CN=Users,DC=server,DC=local" />
</connectionStrings>
<authentication mode="Forms">
<forms
name=".ADAuthCookie"
timeout="10" />
</authentication>
<authorization>
<deny users="?" />
<allow users="*" />
</authorization>
<membership defaultProvider="MyADMembershipProvider">
<providers>
<add
name="MyADMembershipProvider"
type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="ADConnectionString"
connectionUsername="server\administrator"
connectionPassword="password"/>
</providers>
</membership>
Men när applikationen ska exekvera Membership.ValidateUser(user,pass); kastar den "System.Configuration.ConfigurationErrorsException Unrecognized attribute 'attributeMapUsername'. Note that attribute names are case-sensitive."
Någon som kan hjälpa?
Sv: Active Directory
<membership defaultProvider="MembershipADProvider">
<providers>
<add name="MembershipADProvider" type="System.Web.Security.ActiveDirectoryMembershipProvider" attributeMapUsername="sAMAccountName" connectionStringName="ADConnectionString"/>
</providers>
</membership>