locked
Forms Authentication with LDAP RRS feed

  • Question

  • HI,

    I am using MOSS 2007 environment and I have created created web application and extended that web application to Forms Authentication and updated both Central admin web.config and extended web application web.config files. When I am trying to add LDAP users to Policy for web application and I could not find any users from LDAP. Below is my config file settings, Please correct me if I am missing anything.

    I have followed articles and updated the web.config files and I didn't understand what exactly the defaultProvider="AspNetWindowsTokenRoleProvider" at role provider. What will be the default provider value at role manager.

    <membership defaultProvider="LdapMembership">
    <providers>
    <add name="LdapMembership"
    server="my server name"
    port="389"
    useSSL="false"
    userDNAttribute="distinguishedName"
    userNameAttribute="sAMAccountName"
    userContainer="CN=Users, DC=xxx, DC=US"
    userObjectClass="person"
    userFilter="(ObjectClass=person)"
    scope="Subtree"
    otherRequiredUserAttributes="sn,givenname,cn" type="Microsoft.Office.Server.Security.LDAPMembershipProvider, Microsoft.Office.Server, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C" />
    </providers>
    </membership>

    <roleManager enabled="true" defaultProvider="AspNetWindowsTokenRoleProvider">
        <providers>
          <add name="LdapRoleProvider"
            type="Microsoft.Office.Server.Security.LdapRoleProvider, Microsoft.Office.Server, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
            server="my server name"
            port="389"
            useSSL="false"
            groupContainer="CN=Users,DC= xxx,DC=com"
            groupNameAttribute="cn"
            groupNameAlternateSearchAttribute="samAccountName"
            groupMemberAttribute="member"
            userNameAttribute="sAMAccountName"
            dnAttribute="distinguishedName"
            groupFilter="(ObjectClass=group)"
            userFilter="(ObjectClass=person)"
            scope="Subtree" />
        </providers>
      </roleManager>

    Thanks in advance.

    Ratna


    Ratna
    Thursday, February 24, 2011 6:32 PM

Answers

  • My suggestion in your case:

    your config:

    <roleManager enabled="true" defaultProvider="AspNetWindowsTokenRoleProvider ">
        <providers>
          <add name="LdapRoleProvider".............

    MY Suggested:

    <roleManager enabled="true" defaultProvider="LdapRoleProvider ">
        <providers>
          <add name="LdapRoleProvider "...............

     

    http://www.simple-talk.com/dotnet/windows-forms/configuring-forms-authentication-in-sharepoint-2007/

     

    hope this help

    thanks

    -ws


    SharePoint administrator, MCTS,MCITP
    • Marked as answer by Leoyi Sun Thursday, March 3, 2011 2:09 AM
    Thursday, February 24, 2011 8:08 PM
  • Hi Ratna,

     

    Please check my webconfig settings

    <membership defaultProvider="ExEmployeeAuthentication">
          <providers>
            <add name="ExEmployeeAuthentication" type="ExEmployeeAuthProvider.Users.ExEmployeeUserProvider" />
          </providers>
        </membership>
        <roleManager defaultProvider="AspNetWindowsTokenRoleProvider" enabled="true">
          <providers>
            <add name="ExEmployeeRoleAuthentication" type="ExEmployeeAuthProvider.Users.ExEmployeeRoleProvider,ExEmployeeAuthProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8724022bf0e8afa5" />
          </providers>
        </roleManager>

     

    Also try adding

      <add assembly="ExEmployeeAuthProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8724022bf0e8afa5" />

     

    For more details on Forms authentication please check my blog link at

    http://chanakyajayabalan.wordpress.com/2010/06/22/forms-authentication-in-sharepoint-using-custom-membership-role-providers/

    This contains linkd to pdfs that explain FBA in detail.


    Thanks,
    Chanakya
    • Marked as answer by Leoyi Sun Thursday, March 3, 2011 2:09 AM
    Friday, February 25, 2011 6:07 AM

All replies

  • My suggestion in your case:

    your config:

    <roleManager enabled="true" defaultProvider="AspNetWindowsTokenRoleProvider ">
        <providers>
          <add name="LdapRoleProvider".............

    MY Suggested:

    <roleManager enabled="true" defaultProvider="LdapRoleProvider ">
        <providers>
          <add name="LdapRoleProvider "...............

     

    http://www.simple-talk.com/dotnet/windows-forms/configuring-forms-authentication-in-sharepoint-2007/

     

    hope this help

    thanks

    -ws


    SharePoint administrator, MCTS,MCITP
    • Marked as answer by Leoyi Sun Thursday, March 3, 2011 2:09 AM
    Thursday, February 24, 2011 8:08 PM
  • Hi Ratna,

     

    Please check my webconfig settings

    <membership defaultProvider="ExEmployeeAuthentication">
          <providers>
            <add name="ExEmployeeAuthentication" type="ExEmployeeAuthProvider.Users.ExEmployeeUserProvider" />
          </providers>
        </membership>
        <roleManager defaultProvider="AspNetWindowsTokenRoleProvider" enabled="true">
          <providers>
            <add name="ExEmployeeRoleAuthentication" type="ExEmployeeAuthProvider.Users.ExEmployeeRoleProvider,ExEmployeeAuthProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8724022bf0e8afa5" />
          </providers>
        </roleManager>

     

    Also try adding

      <add assembly="ExEmployeeAuthProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8724022bf0e8afa5" />

     

    For more details on Forms authentication please check my blog link at

    http://chanakyajayabalan.wordpress.com/2010/06/22/forms-authentication-in-sharepoint-using-custom-membership-role-providers/

    This contains linkd to pdfs that explain FBA in detail.


    Thanks,
    Chanakya
    • Marked as answer by Leoyi Sun Thursday, March 3, 2011 2:09 AM
    Friday, February 25, 2011 6:07 AM
  • Thnaks everybody. I have figured out the problem and it is now without any problems.


    Ratna
    Tuesday, March 29, 2011 4:16 PM