Monday, June 20, 2011

Silver light-SharePoint development tips

Silverlight provides very rich UI and it can used very well to communicate with SP2010. But there are a lot of hidden issues how to develop, debug and test SL. In this post I will share the challenges I experienced with Silverlight in SharePoint 2010 and solutions to help others to cut the corners.

1) Development

With SharePoint 2010 you can use Silverlight 3.5 or Silverlight 4.0. We had no dependency on .NET Framework version so picked the decent 4.0 version. You need to install Silverlight 4.0 Tools, SDL, WCF

When you create a new Silverlight project you will be asked if you want to host it in the external Web Application. In all articles I read they recommend not to host in external webApp and build and deploy directly to SharePoint via Features . It’s up to you if you choose that way, but for me deploying to SharePoint and testing form there is very annoying and time consuming process (it builds WSP, deploys WSP, resets IIS, SharePoint page recompiles), so I prefer to develop and deploy to the simple aspx page and then deploy to SharePoint when necessary. The development is much faster in this case.

2) Web Services

To communicate with external systems you need to make calls ether directly from Silverlight or using Web Services. Take into account that Silverlight is the client technology and all calls will be made from the client's browser (similar to making call to external system via javascript – JSON and REST models is what you need). It’s ok to make calls to SharePoint Object Model (Lists, Sites and etc) directly from Silverlight, but working with Database will be quire expensive in terms of loading your server with requests. In this case you need to consider creating the Web Service and call database from there.

Silverlight has limited support of SOAP services, so, consider using WCF Services, due to better support of serialized types.

3) Debugging

SharePoint Silverlight debugging in Visual Studio is not supported by default, due to Script debugging settings turned on. It means that you can’t set breakpoints and step into your code in VS if you are not deploying Silverlight controls via feature. Such functionality is supported when you host your SL project in external Web Project (another reason not to host in SharePoint during development)

To provide the SharePoint SL debugging capabilities you need to package your .XAP file in SharePoint Project (in VS) and deploy as a Feature. Such approach allows to enable “Siverlight Debugging” instead of client one, and step into your .cs code from Visual Studio 2010. This options is set from the VS IDE. Navigate to the SharePoint project properties –> SharePoint Tab –> click “Enable Silverlight Debugging”. That checkbox will activate the Remote Debugger and you will be able to debug SL hosted in SharePoint using Visual Studio 2010 (but you need to configure the Remote Debugger first, opening the firewall ports. On the 64bit windows you need to configure the x86 version of msvsmon.exe because the Visual Studio is x86)

I found really strange behaviour that debugging doesn’t work if you don’t have another instance of the the SL page opened in browser. Seems there is a bug resolving assemblies, because when you start debugging your solution might be re-builded , IIS restarts, thus remote debugger can’t attach to the right assemblies. To fix it just open another tab in browser, navigate to page with SL control you are debugging and only after that start debugging which will open the second instance of that page.

4) Deployment

You can deploy your Silverlight controls (XAP files) either externally Take into account that if you host Web Service outside Silverlight you need to supply ClientAccessPolicy.xml and crossdomain.xml for the cross-domain calls. Create and put these files into the root folder of SharePoint (\inetpub\wwwroot\wss\VirtualDirectories\) or into the root of the external hosing(depending the way you host SL and services)

To deploy the XAP files to SharePoint they recommend to use the following locations: SharePoint Library, “_catalogs/masterpage/”, “_layouts” or custom locations. I found that the standard SharePoint 2010 controls are stored into the “_layouts/clientbin/” folder. This folder is designed to be a standard place for hosting assemblies that are used in Silverlight. Take into account that all files deployed to SharePoint are ghostable (even you don’t specify the type), and you won’t see them on physical drive - use the SharePoint Designer to check the the file presence in the folder you deployed it.

Wednesday, May 4, 2011

Programmatically access user profile object using client object model SharePoint 2010


Here is a Code snippet for retrieving user profile object using Client Object model ECMAScript and Silverlight . I am passing the userId from the front end to get the user profile object.

Code using Silver light

ListItemCollection collList;
string FailedMessage;
private void getUserProfile(int userID)
{
ClientContext clientContext = new ClientContext("PortalURL");
Web oWebsite = clientContext.Web;
oList = clientContext.Web.SiteUserInfoList;
CamlQuery query = new Microsoft.SharePoint.Client.CamlQuery();
string camlQueryXml = "' +'' + userID + '' + 1";
query.ViewXml = camlQueryXml;
collList = oList.GetItems(query);
clientContext.Load(collList);
clientContext.ExecuteQueryAsync(new ClientRequestSucceededEventHandler(onRequestSucceeded), new ClientRequestFailedEventHandler(OnRequestFailed));
}
private void onRequestSucceeded(Object sender, ClientRequestSucceededEventArgs args)
{
try
{
// This is not called on the UI thread.
Dispatcher.BeginInvoke(BindData);

}
catch (Exception ex)
{
MessageBox.Show("Error occured in function onRequestSucceeded() of type " + ex);
}
}
public void OnRequestFailed(Object sender, ClientRequestFailedEventArgs args)
{
FailedMessage = "Request Failed Called with " + args.Message;
Dispatcher.BeginInvoke(ShowFailedMessage);
}
private void ShowFailedMessage()
{
MessageBox.Show(FailedMessage);
}
private void BindData()
{
foreach (ListItem li in collList)
{

//Now U bind the data to collection and use it in all the project.
}
}

Code Using ECMA Script

private void getUserProfile(userID)
{
ClientContext clientContext = new ClientContext('PortalURLl');
Web oWebsite = clientContext.Web;
ListItemCollection collList ;
oList = clientContext.Web.SiteUserInfoList;
CamlQuery query = new Microsoft.SharePoint.Client.CamlQuery();
string camlQueryXml = "' +'' + userID + '' + 1";
query.ViewXml = camlQueryXml;
collList = oList.GetItems(query);
clientContext.Load(collList);
clientContext.ExecuteQueryAsync(new ClientRequestSucceededEventHandler(onRequestSucceeded), new ClientRequestFailedEventHandler(OnRequestFailed));
}

function onRequestSucceeded(sender, args)
{
var item = collListItem.itemAt(0);
var profile = item.get_item(‘Notes’);
var pictureUrl = item.get_item(‘Picture’).get_url();
var Preferedname=item.get_item(‘PreferedName’);
var Loginame=item.get_item(‘LoginName’);
var Firstname=item.get_item(‘FirstName’);

}

function onRequestFailed(sender, args)
{
alert('Request failed with error'+args.message);
}

Monday, April 18, 2011

New Features in SharePoint Designer 2010

It's been a pleasure working SharePoint Designer (SPD) 2010 over the last several months. Some of the important new features I have listed below comparing with SPD2007

  • Greatly improved UI, which is very helpful
  • You can now use the Ribbon, Quick Launch Navigator and Site Content Structure for Site information
  • Using Site Content Structure, you can create a: Web Part page, MasterPage, list, and workflow
  • Permissions can be set for individual users
  • Saving and deleting site templates is now possible
  • The ability to use XSLT List View Web Parts to show dynamic views of your data
  • Support for attaching workflows to content types
  • Support for workflow templates
  • Create Content Types and attach to lists

For your convenience, I've created a chart comparing the features between SharePoint Designer 2007 and SharePoint Designer 2010:

Issues

SP Designer 2007

SP Designer 2010

UI in Sharepoint Designer

- See structure site information such as: Pages, list, Master page
- Use Ribbon
- Use Quick Launch Navigator
- Show structure site information

- Yes
- No
- No
- No

- Yes
- Yes.
- Yes
- Yes

Lists

- Can Add New/Rename/Delete list
- See all structure of list - Add/Edit/Delete columns
- New/Modify/Delete views
- New/Modify/Delete workflows on current list
- New/Modify/Delete Content Type
- Modify Setting list
- Add/Edit/Delete Custom Action (very useful!)

- Yes
- No
- No
- No
- No
- No
- No

- Yes
- Yes
- Yes -
- Yes
- Yes
- Yes

- Yes -

Site Content Struture

- Can Create/Delete subsite
- Create pages, master page, lists for site
- Add/modify Group
- Edit Title/Description of the site and content of site
- Manage site settings, save and delete site template
- View all/manage content type
- All pages stored in SitePages document=> easy to control.

- Yes
- No
- No
- No
- No
- No
- No

- Yes
- Yes -
- Yes
- Yes -
- Yes -
- Yes
- Yes -

Use XSLT List View Web Parts

- Show dynamic views of your data via XSLT List View Web Parts

- No

- Yes

Workflows

- Workflows: more actions than SP Designer 2007 (Workflow Actions In SP Designer 2007 )
- Import workflows from Visio
- Export workflows to Visio
- List Workflow, Reusable and site Workflow

- Yes

- No
- No
- No

- Yes

- Yes
- Yes
- Yes

Content Types

- Create/Edit/Delete Content type
- Setting for Content Type
- Apply Content Type to list

- No
- No
- No

- Yes -
- Yes -
- Yes -


Wednesday, March 2, 2011

List of SharePoint Events

List of SharePoint Events

Here is the full list of SharePoint Services 3.0 Events that you can handle with your recievers:

Item – level events (SPItemEventReceiver Methods)
Synchronous
ItemAdding
Synchronous Before event that occurs when a new item is added to its containing object.
ItemAttachmentAdding
Synchronous Before event that occurs when a user adds an attachment to an item.
ItemAttachmentDeleting
Synchronous Before event that occurs when a user removes an attachment from an item.
ItemCheckingIn
Synchronous Before event that occurs as a file is being checked in.
ItemCheckingOut
Synchronous Before event that occurs after an item is checked out.
ItemDeleting
Synchronous Before event that occurs before an existing item is completely deleted.
ItemFileMoving
Occurs when a file is being moved.
ItemUncheckedOut
Synchronous Before event that occurs when an item is being unchecked out.
ItemUncheckingOut
Synchronous Before event that occurs when an item is being unchecked out.
ItemUpdating
Synchronous Before event that occurs when an existing item is changed, for example, when the user changes data in one or more fields.
Asynchronous
ItemAdded
Asynchronous After event that occurs after a new item has been added to its containing object.
ItemAttachmentAdded
Asynchronous After event that occurs after a user adds an attachment to an item.
ItemAttachmentDeleted
Asynchronous After event that occurs when after a user removes an attachment from an item.
ItemCheckedIn
Asynchronous After event that occurs after an item is checked in.
ItemCheckedOut
Asynchronous After event that occurs after an item is checked out.
ItemDeleted
Asynchronous After event that occurs after an existing item is completely deleted.
ItemFileConverted
Asynchronous After event has been converted.
ItemFileMoved
Occurs after a file is moved.
ItemUpdated
Asynchronous After event that occurs after an existing item is changed, for example, when the user changes data in one or more fields.
List – level events (SPListEventReceiver Methods)
Synchronous
FieldAdding
Occurs when a field link is being added to a content type.
FieldDeleting
Occurs when a field is in the process of being removed from the list.
FieldUpdating
Occurs when a field link is being updated
Asynchronous
FieldAdded
Occurs after a field link is added.
FieldDeleted
Occurs after a field has been removed from the list.
FieldUpdated
Occurs after a field link has been updated
Web and Site – level events (SPWebEventReceiver Methods)
Synchronous
WebMoving
Synchronous Before event that occurs before an existing Web site has been renamed or moved to a different parent object.
WebDeleting
Synchronous Before event that occurs before an existing Web site is completely deleted.
SiteDeleting
Occurs when (before) a site collection is being deleted.
Asynchronous
SiteDeleted
Occurs after a site collection has been deleted.
WebMoved
Asynchronous After event that occurs after an existing Web site has been moved.
WebDeleted
Asynchronous After event that occurs after an existing Web site is completely deleted.

Tuesday, March 1, 2011

Office365 Features



The SharePoint Online version in Office 365 is based on the SharePoint 2010 platform. With the introduction of SharePoint Online 2010 in Office 365 the SharePoint On Premise platform and SharePoint Online platform will basically be on par. However, not all functionality will be supported in Office 365 / SharePoint Online 2010.
An overview:
Sites and Communities:
  • SharePoint for Internet Sites (targeted for release in FY12). Supports customizations, site authoring, and WCM workflow and approval.
Content Management:
  • Access to customer asset management systems. This limitation disables support for end-to-end eDiscovery scenarios. Targeted for W15.
Search:
  • 'Unified' Search results combining online and customer site sources. (Targeted for W15)
  • FAST Search which includes features such as thumbnails, previews, contextual search, visual best bets, and deep search refinement. Targeted for W15.
Insights:
  • Business Connectivity Services (BCS) which eliminates the ability to access external services. Targeted for release in FY12.
  • PerformancePoint Services. Targeted for W15.
  • PowerPivot is unable to connect to external services. Targeted for release in FY12.
Composites:
  • Sandbox Solutions are targeted at the site collection level.
  • Alternatives to higher-end custom solutions (full-trust code) are targeted for FY12 and W15.
· Below you'll find some site limitations regarding SharePoint Online. These are helpful in designing a new environment.
· Max. Site Collection size: 50GB
· Max. Number of Site Collections: 20
· Max. Document upload size: 250MB
The SharePoint Online service administrator can set the storage limit for site collections and sites. This can be anywhere between the range of 24 MB (minimum) to 100 GB (maximum) for any site collection.
The administrator has the power to set the quota. But it's important to understand how much storage SharePoint Online initially assigns to site collections -- and after that the company will be charged on a monthly basis. Currently, SharePoint online provides 10 GB of storage (for single-company tenancy), along with 500 MB for each registered user (which is mainly for the user's My Site, which is a separate site collection).
This storage is available across all the site collections so the administrator can manage it in the form of a quota and allocate according to need to individual site collections. However, the maximum storage currently made available to a single company tenancy is 5 TB. This means that the company needs to pay for any storage other than their 10GB storage quota, and this needs to be done on monthly basis.
SharePoint Online, as well as SharePoint Server 2010, is highly productive because of its integration with Microsoft Office products. For most companies this is important starting point as they already have full desktop versions of Microsoft Office products installed in their environment, the good news is that SharePoint Online supports almost all of the Microsoft Office products as shown if figure below.

















Another important part of the productivity boost is using some of the common SharePoint functionalities like tasks, contacts, calendar and discussions right from Outlook 2010, rather than going through SharePoint site. The integration of Outlook 2010 and SharePoint Online is quite deep, as shown in figure below.










Another important consideration for organizations is cross browser support for any Web-based application. Microsoft SharePoint Online fully supports IE 7 and IE 8. Non-Microsoft browsers Firefox 3 and Safari 3.1.2 (only for Macintosh) are supported, but some of the functionality may be absent. Another difference in user experience while using non Microsoft browsers is that user will get prompted to enter their credentials every time they access the SharePoint Online sites. On the other hand, while using IE 7 and IE 8 user will be required enter credentials only once and on subsequent access of the sites they are not required to enter their credentials again.
It's crucial for organizations to understand the user interface limitations within non Microsoft browsers. This will help avoiding awkward and undesirable situations where users are expecting similar experience for all the browsers which their organization is supporting.
SharePoint Online delivers SharePoint as a cloud service. It helps businesses create sites to share documents and insights and enable collaboration between colleagues, partners, and customers. People can also customize these capabilities to address specific business needs. This means that people can share ideas and expertise and find the information they want—all without the need to set up SharePoint in their organization’s data center. Plus, SharePoint Online provides high availability, comprehensive security, and simplified management. SharePoint Online provides sites to:
  1. Manage and share important documents. (My Sites)
  2. Keep teams in sync and manage important projects. (Team Sites)
  3. Stay up-to-date with company information and news. (Intranet Sites)
  4. Share documents securely with partners and customers. (Extranet Sites)
  5. Market your business using a simple public-facing website. (Internet Sites)
Given below are some of the key features of SharePoint Online in Office 365:
Feature
Description
Storage
500 megabytes (MB) per user account
Site storage quotas
Up to 50 gigabytes (GB) per site collection
Site collections
Multiple
Total storage per tenant
Up to 1 terabyte per tenant
File upload limit
250 MB
Works with Microsoft Office 2010
Microsoft Access 2010, Microsoft Excel 2010, Microsoft InfoPath 2010, Microsoft OneNote 2010, Microsoft Outlook 2010, Microsoft PowerPoint 2010, Microsoft SharePoint Workspace 2010, Microsoft Word 2010
Browser support
  • Internet Explorer 7
  • Internet Explorer 8
  • Firefox 3
  • Safari 3.1.2 on Macintosh OS X 10.5
Mobile device support
  • Windows Mobile 6.5.x
  • Nokia E series and N series devices
  • Apple iPhone 2.0
Points to note on storage are:
  • The storage is aggregated/pooled among the users. For example, an organization of 1,000 users has 500,000 MB (~500 GB) of storage.
  • Users can purchase more SharePoint Online storage in GB increments charged monthly
  • The SharePoint Online service administrator can set the storage limits for site collections and sites created by users. The maximum storage available for any site collection is 50 GB
  • The maximum SharePoint Online storage available to a single company is 1 terabyte
SharePoint Online Capabilities
As in on-premise SharePoint 2010, all the 6 primary capabilities are available in SharePoint Online: Sites, Communities, Content, Search, Insights and, Composites. note: Not all the features in SharePoint 2010 are available during the Office 365 Beta and also may not be available at General Availability of SharePoint Online. Some features will be made available to SharePoint Online users in subsequent updates released quarterly. These are highlighted clearly in the service description document.
Office integration
SharePoint Online works with familiar Office applications. You can easily create Office documents and save directly to SharePoint Online, or you can coauthor documents with Microsoft Office Web Apps. Access important documents offline or from mobile devices and set document-level permissions to help protect sensitive content. With one click you can communicate in real-time with colleagues, customers, and partners from within SharePoint sites.
Some highlights of the new functionality in Microsoft Office 2010 that interoperate with SharePoint Online include:
  • Backstage View: The Microsoft Office Backstage™ view allows users to manage their documents and related data—they can create, save, and send documents; inspect documents for hidden metadata or personal information; set options such as turning on or off AutoComplete suggestions; and more.
  • PowerPoint Broadcasting: Presenters can broadcast their slide shows to people in other locations, whether or not they have PowerPoint installed.
  • Document Co-Authoring: With new co-authoring capabilities, multiple users can edit the same document, at the same time, even if they are in different locations. Users can even communicate as they work, directly from within the desktop application.
  • Outlook Alerts: Users can stay updated on changes to documents and list items on their SharePoint site by receiving notifications of changes as alerts and Really Simple Syndication (RSS).
  • Using SharePoint Workspace to Manage Documents Offline: Users can synchronize SharePoint 2010 libraries and lists to their computers with just a few clicks. They can easily update documents and lists offline, and be confident that everything will automatically synchronize to the server when they are back online.
Together, Outlook 2010 and SharePoint Online support:
  • Read/write access to SharePoint Online items such as calendars, tasks, contacts, discussions, and documents.
  • Synchronization for offline support of document libraries and lists.
  • Ability to check out and edit SharePoint site documents when offline.
  • Roll-up views of calendars and tasks across multiple lists and sites.
  • Unified view of personal and SharePoint tasks in Outlook 2010.
SharePoint Designer 2010 Support
Microsoft SharePoint Designer 2010 is a Web and application design program you can use to design, build, and customize your Web sites on SharePoint Online. With SharePoint Designer 2010, you can create data-rich Web pages, build powerful workflow-enabled solutions, and design the look and feel of your site. The Workflow Designer in SharePoint Designer 2010 can be used to create rules that associate conditions and actions with items in SharePoint Online lists and libraries. Changes to items in lists or libraries then trigger actions in the workflow.
note: Backup and restore from SharePoint Designer is not supported in SharePoint Online
Data Backup
Data protection services are provided to prevent the loss of SharePoint Online data. Backups are performed every 12 hours and retained for 14 days. This is not available during Beta.
Virus Filtering
Forefront Security for SharePoint is included with SharePoint Online to help protect the SharePoint Online environment from viruses while maintaining uptime and optimizing performance.
Developer Help
You can find articles, videos, and training for the developer features available in SharePoint Online at theSharePoint Online Developer Resource Center. Start by viewing Video: Developing for SharePoint 2010 Online: Understanding the boundaries - In this video from Tech Ed North America 2010, developer evangelist Chris Mayo helps define what the developer can and cannot do with SharePoint Online to help you understand where the boundaries lie.
Sandboxed Solutions
SharePoint Online allows tenant administrators to upload custom solutions without Microsoft review with a new feature called sandboxed solutions, which run at the site collection level and use a subset of the Microsoft.SharePoint namespace.
Client Object Model
The unified client object model in SharePoint Online provides a streamlined development experience and easy access to SharePoint functionality from remote clients. SharePoint Online supports Web 2.0 types of applications that are hosted in the browser and written in ECMAScript (JavaScript, JScript) or Microsoft Silverlight 2.0, and classical .NE
Besides these options, you can enrich solutions be leveraging Excel, InfoPath Forms, Visio, and Access Services and also use the Web services available in SharePoint Online to interact with your SharePoint data remotely.
Administrator Help
The SharePoint Online Administrator manages site collections, sets up site collection administrators, ensures that storage quotas are maintained, and enables features on site collections. The SharePoint Online Administration Guide contains procedures for the SharePoint Online Administrator.
SharePoint Online Planning and Administration contains planning guides to help guide site collection administrators and site owners through the steps involved in setting up and using SharePoint Online for Microsoft Office 365 Beta.
Some of the most important risks to consider with adopting SharePoint in the cloud include:
· Data security: Hosting data in a remote data center exposes you to risk since data center staff or others outside of your organization might have access to your data.
· Dedicated or multi-tenant: A dedicated environment will provide the same capabilities as a server hosted in your environment, but it will cost significantly more than a shared environment that is used by many tenants. A multi-tenant environment like Microsoft’s Business Productivity Online Suite (BPOS) will be significantly less expensive than a dedicated environment, but there will be some restrictions on what you can deploy. Which environment is right for you? Why?
· Physical security: Data may be stored in many data centers. How can you ensure that the data centers hosting your data have adequate physical security to ensure integrity and confidentiality of your data?
· Data ownership and control: Read the fine print and make sure you know who owns the data. How can you be sure you are not held hostage now that your data is no longer under your control?
· Service level agreements: Do the service level agreements (SLAs) available in the cloud solutions you’re considering meet the needs of the business? Consider speed, uptime, and disaster recovery.
· System downtime compensation: What leverage do you have to ensure that you will be fairly compensated if the service is unavailable for any length of time?
· Data transmission across national borders: Data could be hosted anywhere in the world. What assurance do you have that you aren’t violating local laws and regulations where your data is stored or transmitted?
· Data discovery: What happens if the cloud provider is seized or searched by a local authority hosting your data? What rights do you have to protect and preserve your data?
· Identity management: How is the identity of users managed? Can you manage user identity and limit your exposure to outside system users through federation of identity stores?
· Third-party applications: Are third party add-ons needed to work within your solution? If so, do they run in the cloud, and what are the licensing implications?
· Your existing staff: How are they involved in the migration to the cloud, and what is their long-term role in a cloud-based solution?
· Data storage limitations: How much data can you store in the cloud, and what are the costs to increase the storage quota?
· Retrieval limits: What are the limits imposed on data retrieval? For example, can you retrieve 25,000 items from a list at one time? What does the business need? What limits are in place and what is required?
· Development considerations: What limitations have been introduced by the cloud-based offering? For example, all custom code should be put in a Sandbox with SharePoint 2010. What other limitations must be designed within the solution?
· Testing: How can you test prior to a full-scale deployment to the cloud?
· Data migration: How can you migrate data to the cloud environment?
· Data retention policies: How long is data maintained for disaster recovery purposes?

SharePoint 2010 boundaries, Thresholds and Supported limits

9FEB/110

SharePoint 2010 boundaries, Thresholds and Supported limits

Many would be considering SharePoint 2010 for their environment and questions will be asked to SharePoint Admins and Architects on the product.
Here is some handy information from Microsoft on the limitations (boundaries) of SharePoint 2010.

Before we dive into it, letz define what are the limit types:

  • Boundaries: Static limits that cannot be exceeded by design
  • Thresholds: Configurable limits that can be exceeded to accommodate specific requirements
  • Supported limits: Configurable limits that have been set by default to a tested value.

Web application limits

The following table lists the recommended guidelines for Web applications.

LimitMaximum valueLimit typeNotes
Content database300 per Web applicationSupportedWith 300 content databases per Web application, end user operations such as opening the site or site collections are not affected. But administrative operations such as creating a new site collection will experience decrease in performance. We recommend that you use Windows PowerShell to manage the Web application when a large number of content databases are present, because the management interface becomes slow and difficult to navigate.
Zone5 per Web applicationBoundaryThe number of zones defined for a farm is hard-coded to 5. Zones include Default, Intranet, Extranet, Internet, and custom.
Managed path20 per Web applicationSupportedManaged paths are cached on the Web server, and CPU resources are used to process incoming requests against the managed path list.

Exceeding 20 managed paths per Web application adds more load to the Web server for each request.

If you plan to exceed twenty managed paths in a given Web application, we recommend that you test for acceptable system performance.

Solution cache size300 MB per Web applicationThresholdThe solution cache allows the InfoPath Forms service to hold solutions in cache in order to speed up retrieval of the solutions. If the cache size is exceeded, solutions are retrieved from disk, which may slow down response times. You can configure the size of the solution cache by using the Windows PowerShell cmdlet Set-SPInfoPathFormsService. For more information, see Set-SPInfoPathFormsService [ http://technet.microsoft.com/en-au/library/ff608034.aspx ] .

Web server and application server limits

The following table lists the recommended guidelines for Web servers on the farm.

LimitMaximum valueLimit typeNotes
Application pools10 per Web serverSupportedThe maximum number is determined by hardware capabilities.

This limit is dependent largely upon:

  • The amount of RAM allocated to the Web servers
  • The workload that the farm is serving, that is, the user base and the usage characteristics (a single highly active application pools can reach 10 GB or more)

Content database limits

The following table lists the recommended guidelines for content databases.

LimitMaximum valueLimit typeNotes
Content database size200 GB per content databaseSupportedWe strongly recommended limiting the size of content databases to 200 GB to help ensure system performance.

Content database sizes up to 1 terabyte are supported only for large, single-site repositories and archives with non-collaborative I/O and usage patterns, such as Records Centers. Larger database sizes are supported for these scenarios because their I/O patterns and typical data structure formats have been designed for, and tested at, larger scales. For more information about large-scale document repositories, see “Estimate Performance and Capacity Requirements for Large Scale Document Repositories”, available fromPerformance and capacity test results and recommendations (SharePoint Server 2010) [ http://technet.microsoft.com/en-au/library/ff608068.aspx ] , and “Typical large-scale content management scenarios [ http://technet.microsoft.com/en-au/library/cc263028.aspx ] “, available fromEnterprise content storage planning (SharePoint Server 2010) [ http://technet.microsoft.com/en-au/library/cc263028.aspx ] .

A site collection should not exceed 100 GB unless it is the only site collection in the database.

Site collections per content database2,000 recommended

5,000 maximum

SupportedWe strongly recommended limiting the number of site collections in a content database to 2,000. However, up to 5,000 site collections in a database are supported.

These limits relate to speed of upgrade. The larger the number of site collections in a database, the slower the upgrade.

The limit on the number of site collections in a database is subordinate to the limit on the size of a content database that has more than one site collection (200 GB). Therefore, as the number of site collections in a database increases, the average size of the site collections it contains must decrease.

Exceeding the 2,000 site collection limit puts you at risk of longer downtimes during upgrades. If you plan to exceed 2,000 site collections, we recommend that you have a clear upgrade strategy, and obtain additional hardware to speed up upgrades and software updates that affect databases.

To set the warning level for the number of sites in a content database, use the Windows PowerShell cmdlet Set-SPContentDatabase with the -WarningSiteCount parameter. For more information, see Set-SPContentDatabase [ http://technet.microsoft.com/en-au/library/ff607912.aspx ] .

Remote BLOB Storage (RBS) storage subsystem on Network Attached Storage (NAS)Time to first byte of any response from the NAS cannot exceed 20 millisecondsBoundaryWhen SharePoint Server 2010 is configured to use RBS, and the BLOBs reside on NAS storage, consider the following boundary.

From the time that SharePoint Server 2010 requests a BLOB, until it receives the first byte from the NAS, no more than 20 milliseconds can pass.

Site collection limits

The following table lists the recommended guidelines for site collections.

LimitMaximum valueLimit typeNotes
Web site250,000 per site collectionSupportedThe maximum recommended number of sites and subsites is 250,000 sites.

You can create a very large total number of Web sites by nesting subsites. For example, in a shallow hierarchy with 100 sites, each with 1,000 subsites, you would have a total of 100,000 Web sites. Or a deep hierarchy with 100 sites, each with 10 subsite levels would also contain a total of 100,000 Web sites.

Note: Deleting or creating a site or subsite can significantly affect a site’s availability. Access to the site and subsites will be limited while the site is being deleted. Attempting to create many subsites at the same time may also fail.

Site collection size100 GB per site collectionSupportedA site collection should not exceed 100 GB unless it is the only site collection in the database.

Certain site collection actions, such as site collection backup/restore or the Windows PowerShell cmdlet Move-SPSite, cause large Microsoft SQL Server operations which can affect performance or fail if other site collections are active in the same database. For more information, see Move-SPSite [ http://technet.microsoft.com/en-au/library/ff607915.aspx ] .

List and library limits

The following table lists the recommended guidelines for lists and libraries. For more information, see the “Designing Large Lists and Maximizing List Performance” white paper available from Performance and capacity test results and recommendations (SharePoint Server 2010) [ http://technet.microsoft.com/en-au/library/ff608068.aspx ] .

LimitMaximum valueLimit typeNotes
List row size8,000 bytes per rowBoundaryEach list or library item can only occupy 8000 bytes in total in the database. 256 bytes are reserved for built-in columns, which leaves 7744 bytes for end-user columns. For details on how much space each kind of field consumes, see Column limits.
File size2 GBBoundaryThe default maximum file size is 50 MB. This can be increased up to 2 GB, however a large volume of very large files can affect farm performance.
Documents30,000,000 per librarySupportedYou can create very large document libraries by nesting folders, or using standard views and site hierarchy. This value may vary depending on how documents and folders are organized, and by the type and size of documents stored.
Major versions400,000SupportedIf you exceed this limit, basic file operations—such as file open or save, delete, and viewing the version histor— may not succeed.
Items30,000,000 per listSupportedYou can create very large lists using standard views, site hierarchies, and metadata navigation. This value may vary depending on the number of columns in the list and the usage of the list.
Rows size limit6 table rows internal to the database used for a list or library itemSupportedSpecifies the maximum number of table rows internal to the database that can be used for a list or library item. To accommodate wide lists with many columns, each item may be wrapped over several internal table rows, up to six rows by default. This is configurable by farm administrators through the object model only. The object model method isSPWebApplication.MaxListItemRowStorage [ http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spwebapplication.maxlistitemrowstorage.aspx ] .
Bulk operations100 items per bulk operationBoundaryThe user interface allows a maximum of 100 items to be selected for bulk operations.
List view lookup threshold8 join operations per queryThresholdSpecifies the maximum number of joins allowed per query, such as those based on lookup, person/group, or workflow status columns. If the query uses more than eight joins, the operation is blocked. This does not apply to single item operations. When using the maximal view via the object model (by not specifying any view fields), SharePoint will return up to the first eight lookups.
List view threshold5,000ThresholdSpecifies the maximum number of list or library items that a database operation, such as a query, can process at the same time outside the daily time window set by the administrator during which queries are unrestricted.
List view threshold for auditors and administrators20,000ThresholdSpecifies the maximum number of list or library items that a database operation, such as a query, can process at the same time when they are performed by an auditor or administrator with appropriate permissions. This setting works with Allow Object Model Override.
Subsite2,000 per site viewThresholdThe interface for enumerating subsites of a given Web site does not perform well as the number of subsites surpasses 2,000. Similarly, the All Site Content page and the Tree View Control performance will decrease significantly as the number of subsites grows.
Coauthoring in Microsoft Word and Microsoft PowerPoint for .docx, .pptx and .ppsx files10 concurrent editors per documentThresholdRecommended maximum number of concurrent editors is 10. The boundary is 99.

If there are 99 co-authors who have a single document opened for concurrent editing, any user after the 100th user sees a “File in use” error and have to view a read-only copy.

More than 10 co-editors will lead to a gradually degraded user experience with more conflicts and users will have to go through more iterations to get their changes to upload successfully.

Security scope1,000 per listThresholdThe maximum number of unique security scopes set for a list should not exceed 1,000.

A scope is the security boundary for a securable object and any of its children that do not have a separate security boundary defined. A scope contains an Access Control List (ACL), but unlike NTFS ACLs, a scope can include security principals that are specific to SharePoint Server. The members of an ACL for a scope can include Windows users, user accounts other than Windows users (such as forms-based accounts), Active Directory groups, or SharePoint groups.

Security limits

LimitMaximum valueLimit typeNotes
Number of SharePoint groups a user can belong to5,000SupportedThis is not a hard limit but it is consistent with Active Directory guidelines. There are several things that affect this number:

  • The size of the user token
  • The groups cache: SharePoint Server 2010 has a table that caches the number of groups a user belongs to as soon as those groups are used in access control lists (ACLs).
  • The security check time: as the number of groups that a user is a member of increases, the time that is required for the access check increases also.
Users in a site collection2 million per site collectionSupportedYou can add millions of people to your Web site by using Microsoft Windows security groups to manage security instead of using individual users.

This limit is based on manageability and ease of navigation in the user interface.

When you have many entries (security groups of users) in the site collection (more than one thousand), you should use Windows PowerShell to manage users instead of the UI. This will provide a better management experience.

Active Directory Principles/Users in a SharePoint group5,000 per SharePoint groupSupportedSharePoint Server 2010 enables you to add users or Active Directory groups to a SharePoint group.

Having up to 5,000 users (or Active Directory groups or users) in a SharePoint group provides acceptable performance.

The activities most affected by this limit are as follows:

  • Fetching users to validate permissions. This operation takes incrementally longer with growth in number of users in a group.
  • Rendering the membership of the view. This operation will always require time.
SharePoint groups10,000 per site collectionSupportedAbove 10,000 groups, the time to execute operations is increased significantly. This is especially true of adding a user to an existing group, creating a new group, and rendering group views.
Security principal: size of the Security Scope5,000 per Access Control List (ACL)SupportedThe size of the scope affects the data that is used for a security check calculation. This calculation occurs every time that the scope changes. There is no hard limit, but the bigger the scope, the longer the calculation takes.

Search limits

The following table lists the recommended guidelines for Search.

LimitMaximum valueLimit typeNotes
SharePoint search service applications20 per farmSupportedMultiple SharePoint search service applications can be deployed on the same farm, because you can assign search components and databases to separate servers. The recommended limit of 20 is less than the maximum limit for all service applications in a farm.
Crawl databases and database Items10 crawl databases per search service application

25 million items per crawl database

ThresholdThe crawl database stores the crawl data (time/status, etc) about all items that have been crawled. The supported limit is 10 crawl databases per SharePoint Search service application.

The recommended limit is 25 million items per crawl database (or a total of four crawl databases per search service application).

Crawl components16 per search service applicationThresholdThe recommended limit per application is 16 total crawl components; with two per crawl database, and two per server, assuming the server has at least eight processors (cores).

The total number of crawl components per server must be less than 128/(total query components) to minimize propagation I/O degradation. Exceeding the recommended limit may not increase crawl performance; in fact, crawl performance may decrease based on available resources on the crawl server, database, and content host.

Index partitions20 per search service application; 128 totalThresholdThe index partition holds a subset of the search service application index. The recommended limit is 20. Increasing the number of index partitions results in each partition holding a smaller subset of the index, reducing the RAM and disk space that is needed on the query server hosting the query component assigned to the index partition. The boundary for the total number of index partitions is 128.
Indexed items100 million per search service application; 10 million per index partitionSupportedSharePoint Search supports index partitions, each of which contains a subset of the search index. The recommended maximum is 10 million items in any partition. The overall recommended maximum number of items (e.g., people, list items, documents, Web pages) is 100 million.
Crawl log entries100 million per search applicationSupportedThis is the number of individual log entries in the crawl log. It will follow the “Indexed items” limit.
Property databases10 per search service application;128 totalThresholdThe property database stores the metadata for items in each index partition associated with it. An index partition can only be associated with one property store. The recommended limit is 10 property databases per search service application. The boundary for index partitions is 128.
Query components128 per search application; 64/(total crawl components) per serverThresholdThe total number of query components is limited by the ability of the crawl components to copy files. The maximum number of query components per server is limited by the ability of the query components to absorb files propagated from crawl components.
Scope rules100 scope rules per scope; 600 total per search service applicationThresholdExceeding this limit will reduce crawl freshness, and delay potential results from scoped queries.
Scopes200 per siteThresholdThis is a recommended limit per site. Exceeding this limit may reduce crawl efficiency and, if the scopes are added to the display group, affect end-user browser latency. Also, display of the scopes in the search administration interface degrades as the number of scopes passes the recommended limit.
Display groups25 per siteThresholdDisplay groups are used for a grouped display of scopes through the user interface. Exceeding this limit starts degrading the scope experience in the search administration interface.
Alerts1,000,000 per search applicationSupportedThis is the tested limit.
Content sources50 per search service applicationThresholdThe recommended limit of 50 can be exceeded up to the boundary of 500 per search service application. However, fewer start addresses should be used, and the concurrent crawl limit must be followed.
Start addresses100 per content sourceThresholdThe recommended limit can be exceeded up to the boundary of 500 per content source. However, the more start addresses you have, the fewer content sources should be used. When you have many start address, we recommend that you put them as links on an html page, and have the HTTP crawler crawl the page, following the links.
Concurrent crawls20 per search applicationThresholdThis is the number of crawls underway at the same time. Exceeding this number may cause the overall crawl rate to decrease.
Crawled properties500,000 per search applicationSupportedThese are properties that are discovered during a crawl.
Crawl impact rule100ThresholdRecommended limit of 100 per farm. The recommendation can be exceeded; however, display of the site hit rules in the search administration interface is degraded. At approximately 2000 site hit rules, the Manage Site Hit Rules page becomes unreadable.
Crawl rules100 per search service applicationThresholdThis value can be exceeded; however, display of the crawl rules in the search administration interface is degraded.
Managed properties100,000 per search service applicationThresholdThese are properties used by the search system in queries. Crawled properties are mapped to managed properties.
Mappings100 per managed propertyThresholdExceeding this limit may decrease crawl speed and query performance.
URL removals100 removals per operationSupportedThis is the maximum recommended number of URLs that should be removed from the system in one operation.
Authoritative pages1 top level and minimal second and third level pages per search service applicationThresholdThe recommended limit is one top-level authoritative page, and as few second -and third-level pages as possible to achieve the desired relevance.

The boundary is 200 per relevance level per search application, but adding additional pages may not achieve the desired relevance. Add the key site to the first relevance level. Add more key sites at either second or third relevance levels, one at a time, and evaluate relevance after each addition to ensure that the desired relevance effect is achieved.

Keywords200 per site collectionSupportedThe recommended limit can be exceeded up to the maximum (ASP.NET-imposed) limit of 5000 per site collection given five Best Bets per keyword. If you exceed this limit, display of keywords on the site administration user interface will degrade. The ASP.NET-imposed limit can be modified by editing the Web.Config and Client.config files (MaxItemsInObjectGraph).
Metadata properties recognized10,000 per item crawledBoundaryThis is the number of metadata properties that can be determined and potentially mapped or used for queries when an item is crawled.

User Profile Service limits

The following table lists the recommended guidelines for User Profile Service.

LimitMaximum valueLimit typeNotes
User profiles2,000,000 per service applicationSupportedA user profile service application can support up to 2 million user profiles with full social features functionality. This number represents the number of profiles that can be imported into the people profile store from a directory service, and also the number of profiles a user profile service application can support without leading to performance decreases in social features.
Social tags, notes and ratings500,000,000 per social databaseSupportedUp to 500 million total social tags, notes and ratings are supported in a social database without significant decreases in performance. However, database maintenance operations such as backup and restore may show decreased performance at that point.

Content deployment limits

The following table lists the recommended guidelines for content deployment.

LimitMaximum valueLimit typeNotes
Content deployment jobs running on different paths20SupportedFor concurrently running jobs on paths that are connected to site collections in the same source content database, there is an increased risk of deadlocks on the database. For jobs that must run concurrently, we recommend that you move the site collections into different source content databases.

Note:

Concurrent running jobs on the same path are not possible.

If you are using SQL Server snapshots for content deployment, each path creates a snapshot. This increases the I/O requirements for the source database.

For more information, see About deployment paths and jobs [ http://technet.microsoft.com/en-au/library/ee721058.aspx ] .

Blog limits

The following table lists the recommended guidelines for blogs.

LimitMaximum valueLimit typeNotes
Blog posts5000 per siteSupportedThe maximum number of blog posts is 5000 per site.
Comments1000 per postSupportedThe maximum number of comments is 1000 per post.

Managed Metadata term store (database) limits

The following table lists the recommended guidelines for managed metadata term stores.

LimitMaximum valueLimit typeNotes
Maximum number of levels of nested terms in a term store7SupportedTerms in a term set can be represented hierarchically. A term set can have up to seven levels of terms (a parent term, and six levels of nesting below it.)
Maximum number of term sets in a term store1000SupportedYou can have up to 1000 term sets in a term store.
Maximum number of terms in a term set30,000Supported30,000 is the maximum number of terms in a term set.

Note:

Additional labels for the same term, such as synonyms and translations, do not count as separate terms.

Total number of items in a term store1,000,000SupportedAn item is either a term or a term set. The sum of the number of terms and term sets cannot exceed 1,000,000. Additional labels for the same term, such as synonyms and translations, do not count as separate terms.

Note:

You cannot have both the maximum number of term sets and the maximum number of terms simultaneously in a term store.

Taken from:
http://technet.microsoft.com/en-au/library/cc262787.aspx