ActiveDirectoryMembershipProvider Performance

Discussion in 'ASP .Net Security' started by Brett Rees, Apr 11, 2006.

  1. Brett Rees

    Brett Rees Guest

    I'm using the ActiveDirectoryMembershipProvider with
    connectionProtection=Secure and attributeMapUsername=sAMAccountName to
    authenticate users against our active directory and have run into a
    performance issue. On my development machine everything works great but when
    I put it on the production server the authentication process takes forever,
    30+ seconds. My development machine is running XP Pro and we use Server 03
    for production. On the production machine, if I remove the
    attributeMapUsername=sAMAccountName from the config file and let it use the
    default mapping, userPrincipalName, it works perfectly. Unfortunately, we do
    not want to use the userPrincipalName.

    Any ideas on what would cause this to happen? How can I fix this problem so
    I can use the sAMAccountName and not the userPrincipalName?

    My config settings:
    <configuration>
    <connectionStrings>
    <add name="AdConnectionString"
    connectionString="LDAP://foo.corp.com:389/DC=foo,DC=corp,DC=com"/>
    </connectionStrings>

    <system.web>
    <authentication mode="Forms">
    <forms name="FooAuth" loginUrl="login.aspx" protection="All" path="/"
    timeout="20" slidingExpiration="true" />
    </authentication>
    <authorization>
    <deny users="?"/>
    <allow users="*"/>
    </authorization>

    <membership defaultProvider="AspAdMembershipProvider">
    <providers>
    <add
    connectionStringName="AdConnectionString"
    connectionUsername="fooUserName"
    connectionPassword="fooPassword"
    connectionProtection="Secure"
    enablePasswordReset="false"
    enableSearchMethods="false"
    requiresQuestionAndAnswer="false"
    applicationName="/"
    clientSearchTimeout="30"
    serverSearchTimeout="30"
    attributeMapUsername="sAMAccountName"
    name="AspAdMembershipProvider"
    type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web,
    Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
    </providers>
    </membership>
    </system.web>
    </configuration>
     
    Brett Rees, Apr 11, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Arnel
    Replies:
    3
    Views:
    4,751
    =?Utf-8?B?UGF0cmljay5PLklnZQ==?=
    Oct 31, 2005
  2. Natan Vivo
    Replies:
    1
    Views:
    660
    Patrick.O.Ige
    Oct 31, 2005
  3. Replies:
    0
    Views:
    658
  4. =?Utf-8?B?SkQgUWl4Y2xl?=
    Replies:
    2
    Views:
    5,281
    =?Utf-8?B?SkQgUWl4Y2xl?=
    Jun 9, 2006
  5. moi
    Replies:
    1
    Views:
    5,880
Loading...

Share This Page