SharePoint 2010: "Check names" results in "Item cannot be more than 256 characters"

Symptom

Consider the following scenario:

You copied a series of users as a string from Outlook and pasted it into a User Control inside a SharePoint 2010 site.
You click on the "Check Names" icon and get the following error message: 

"Item cannot be more than 256 characters."

Error Message - Item cannot be more than 256 characters

Cause

This is a by-design behavior which has been introduced in SharePoint 2010 as a security measure.



Resolution

You still can insert up to 200 users inside a SharePoint 2010 user control box. You just need to use the "Check Names" control in smaller batches.
For example, you insert a number of users that add up to less than 256 characters and click the "Check Names" control. You then add another batch of users and click "Check Names", and so on until you have added and resolved all of the desired users.

More Information

The limitation of 200 users is defined by property DefaultMaximumEntities of Class PeopleEditor.

For more details, please check this MSDN article:

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.peopleeditor.defaultmaximumentities.aspx


Properties

Article ID: 2654222 - Last Review: Jan 10, 2012 - Revision: 1

Microsoft SharePoint Server 2010, Microsoft SharePoint Foundation 2010

Feedback