derby leeds blog

Posts Tagged ‘Custom Profile Provider

Following are the steps to be followed to configure custom profile provider in any dev or prod environment.

1.Open the web config file available in the virtual directory.

2.Look for the xml tag “<connectionStrings>”. If it is not available, then include one and add the following tag as an item in it.

<add name=”ProfileProviderConnection” connectionString=”Server=172.30.1.66;Database=ImsCwpProfile;Trusted_Connection=False;” />

3.Look for the xml tag “<authentication>”. Update the xml tag as given below.

<authentication mode=”Forms”>

<forms loginUrl=”/account/Pages/default.aspx” />

</authentication>

4.Look for the xml tag “<anonymousIdentification>”. If it is not available, then include one and add the following tag.

<anonymousIdentification enabled=”true” />

5.Look for the xml tag “<authorization>”. Update the xml tag as given below.

<authorization>

<allow users=”*” />

</authorization>

6.Get the latest version of “IMS.SharePoint2010.Profile” and compile it. Drop the assembly into GAC.

7.Look for the xml tag “<profile>” in the “<system.web>” section. If it is not available, then include one and add the following tag.

<profile defaultProvider=”LearnerInfoProvider” enabled=”true” inherits=”IMS.SharePoint2010.Profile.UserProfile” automaticSaveEnabled=”false”>

<providers>

<clear />

<add name=”LearnerInfoProvider” applicationName=”IMS” type=”IMS.SharePoint2010.Profile.LearnerProfileProvider” connectionStringName=”ProfileProviderConnection” />

</providers>

</profile>

8.Look for the xml tag “<httpModules>”. Add the following tag as an item in it.

<add name=”Profile” type=”System.Web.Profile.ProfileModule” />

9.Look for the xml tag “<assemblies>”. Add the following tag as an item in it. Please ensure that the PublicKeyToken of

“IMS.SharePoint2010.Profile” assembly is the same as mentioned in the below tag. If not, please update the below tag with the exact PublicKeyToken.

<add assembly=”IMS.SharePoint2010.Profile, Version=1.0.0.0, Culture=neutral, PublicKeyToken=2f016df1b3046b22″ />

10.Look for the xml tag “<membership>”. Add the following tag as an item in it.

<membership defaultProvider=”ldapMember”>

<providers>

<add name=”i” type=”Microsoft.SharePoint.Administration.Claims.SPClaimsAuthMembershipProvider, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” />

<add name=”ldapMember” type=”Microsoft.Office.Server.Security.LdapMembershipProvider, Microsoft.Office.Server, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” server=”SFADEVADNCS.ncsdev.local” port=”389″ useSSL=”false” userDNAttribute=”distinguishedName” userNameAttribute=”sAMAccountName” userContainer=”CN=users,DC=ncsdev,DC=local” userObjectClass=”person” userFilter=”(ObjectClass=person)” scope=”Subtree” otherRequiredUserAttributes=”sn,givenname,cn” />

</providers>

</membership>

11.Look for the xml tag “<roleManager>”. Add the following tag as an item in it.

<roleManager defaultProvider=”ldapRole” enabled=”true” cacheRolesInCookie=”false”>

<providers>

<add name=”c” type=”Microsoft.SharePoint.Administration.Claims.SPClaimsAuthRoleProvider, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” />

<add name=”ldapRole” type=”Microsoft.Office.Server.Security.LdapRoleProvider, Microsoft.Office.Server, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” server=”SFADEVADNCS.ncsdev.local” port=”389″ useSSL=”false” groupContainer=”CN=users,DC=ncsdev,DC=local” groupNameAttribute=”cn” groupNameAlternateSearchAttribute=”samAccountName” groupMemberAttribute=”member” userNameAttribute=”sAMAccountName” dnAttribute=”distinguishedName” groupFilter=”(ObjectClass=group)” userFilter=”(ObjectClass=person)” scope=”Subtree” />

</providers>

</roleManager>

12.Look for the xml tag “<modules>”. Ensure that the tag commented below is also commented in your web config file.

<modules runAllManagedModulesForAllRequests=”true”>

<!–<remove name=”Profile” />–>

</modules>