Tag Archive for Configuration

Configuring SQL Server Whitepaper

I recently came across the following whitepaper for configuring SQL Server to get the best performance from it when used in a SharePoint environment.

Download it from here
Or view it from here

Lots of good information in it and well worth keeping to refer to when building SharePoint environments 🙂

LDAP Role Provider Argument Exception

If you’re seeing the following error in the ULS logs, hopefully it’ll be as simple a fix for you as it was for me:

LdapRoleProvider.GetRolesFor() exception: {0}.System.ArgumentException: The (&(((ObjectClass=group))(member=CN=Some User,CN=Users,DC=domain,DC=local)) search filter is invalid.

at System.DirectoryServices.SearchResultCollection.ResultsEnumerator.MoveNext()

at Microsoft.Office.Server.Security.LdapRoleProvider.GetRolesFor(String userOrGroupDN, DirectoryEntry groupContainer, LdapDistinguishedNameManager ldapDnManager, List`1& userRoles)

To resolve this error, all that’s required is to updated the Group and User filter values for the role provider in the forms web application and the security token’s web configuration files.

The role provider settings I had looked something like:

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

Notice the values for groupFilter and userFilter((ObjectClass=person).

This is correct for the Central Administration web configuration. For the forms web application and security token’s configuration this should be updated to (&amp;(ObjectClass=person)).

Perform an IIS reset and next time you log in the exception in the ULS log should be resolved.

User Profile Sync

Sometimes, when trying to create an alert in SharePoint you receive the following error message:

You do not have an e-mail address.
Alert has been created successfully but you will not receive notifications until valid e-mail or mobile address has been provided in your profile

The obvious things to check here are the outgoing mail server settings in Central Administration.

It may be the case that you recently added an email address to the account in question, or after receiving the above error added an email address to the user’s profile in Central Administration.
Read more

Web Config Updates

The SPWebConfigModification class for SharePoint provides an easy way of updating the web config for a web application. Sometimes, however, I’ve seen it used incorrectly.

For example, it’s not advisable to try and write to the web config on Web or Site feature activation as you will more than likely receive an access denied error. Even running the code with elevated permissions will not resolve this as the majority of the time the executing application pool user will not have sufficient access to the web config file, certainly not in a production environment.

The ideal place to host this type of call is in a Web Application or Farm scoped feature’s FeatureActivated method. Unless the farm has been locked down, this will run with the required permissions to be able to update the web config file(s).

An easy way to update the configurations for all web applications hosting content is to use the following from a Farm scoped feature:

SPWebService.ContentService.WebConfigModifications.Add(authorizedTypeActivity);
SPWebService.ContentService.Update(true);
SPWebService.ContentService.ApplyWebConfigModifications();

Or, to update a specific web application from a Web Application scoped feature:

SPWebApplication webApplication = properties.Feature.Parent as SPWebApplication;
 
SPWebService.ContentService.WebApplications[webApplication.Id].WebConfigModifications.Add(authorizedTypeActivity);
SPWebService.ContentService.WebApplications[webApplication.Id].Update(true);
SPWebService.ContentService.ApplyWebConfigModifications();

PeopleEditor control not available error

If you’re using a PeopleEditor control in your solution and enforce the filtering of selectable users by specifying a SharePoint group in the SharePointGroup property you may see the following error instead of the PeopleEditor control:

The control is not available because you do not have the correct permissions

This can happen if the context user does not have adequate permissions against the SharePoint group you specified as the filter group.

For instance, if you create a dummy group to contain the filtered set (where the users are also part of another group which grants them specific permissions) and do not grant any permissions to it when creating, it this error will occur for the majority of users, except the admin users.
Read more

Follow

Get every new post delivered to your Inbox

Join other followers: