Monday, November 19, 2012

SharePoint 2010: User Profile Synchronization Service fails to start with a message "Failed to configure ILM" in ULS

What?

I have setup a new SharePoint 2010 non-production farm in a single server environment with Active Directory, SQL Server 2008 and SharePoint 2010 installed. (Not stand-alone installation)
The dreaded User Profile Synchronization Service fails to start as usual in a newly setup SharePoint 2010 farm.

The following error was found in the ULS logs:

UserProfileApplication.SynchronizeMIIS: Failed to configure ILM, will attempt during next rerun. Exception: System.Data.SqlClient.SqlException: Specified collection 'StringSchemaCollection' cannot be dropped because it is used by object...

Note that the above message shows up as an entry with High priority and not as an exception in ULS log.

Why?

There could be hell a lot of reasons why the User Profile Synchronization Service fails to start. First of all, it does not work in a single server stand alone installation with inbuilt database.

In my case, there were a couple of issues and I will try to explain how I fixed them in this post.

Wednesday, November 14, 2012

Access denied for all users except Farm Account after a SharePoint 2010 content database restore

What?

I successfully did a restore of a SharePoint 2010 site from production into a dev farm which is in a different domain. I am able to access the site normally using the farm account. All other accounts got access denied including the Setup Account.

I verified that the correct application pool is being used, tried to grant access to the setup account as well as the search account at web application level as well but no use.

Why?

The super reader and writer accounts are required to be configured in order for permissions to work normally.

Friday, September 14, 2012

SharePoint 2010 Managed Metadata Import Error "Bulk load data conversion error (CustomSortOrder)"

What?

You receive the below error when you try to Export/Import Managed Metadata Service Application from one farm to another.



Import-SPMetadataWebServicePartitionData : Bulk load data conversion error (tru
ncation) for row 11, column 7 (CustomSortOrder).

One of the easiest ways to backup/restore Managed Metadata Service Application from one farm/environment to another is using import/export functionality.

I have explained this procedure a little while ago in this blog post

I have been successfully using the Import/Export method with no issues until I stumbled across this error today.

Why?

As the error hints, the error occurred due to specifying custom sort order in one of the term sets.


Monday, September 10, 2012

Speaking at Melbourne SharePoint User Group (MSPUG) on the 26th September 2012

What?



When?

Wednesday,5:30PM  (for 6pm start)






Tuesday, September 4, 2012

How to mix HTTP and HTTPS pages in a SharePoint 2010 site?

What?

How to have a combination of both HTTP and HTTPS pages in the same SharePoint 2010 site with configuration only without writing code?

Why?

It is a very common requirement to have a mix of HTTP and HTTPS pages in public facing SharePoint sites. Examples of such pages generally are login pages, contact forms, new testimonial form pages, new user review form pages  and any other pages that capture sensitive data from users. In these cases, only those specific pages must be loaded as HTTPS pages where as the rest of the pages in the site must be loaded as HTTP pages.

Tuesday, August 7, 2012

How to fix SharePoint Designer 2010 error "The URL '_catalogs/masterpage/page layout.aspx' is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current web."

What?

SharePoint Designer 2010 throws error "The URL '_catalogs/masterpage/page layout.aspx' is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current web." when you attempt to update an existing page layout. All other page layouts can be updated normally.


Why?

There could be various reasons for this error. I have already explained about one of the various reasons that could trigger this error in this blog post earlier.

How?

This error occurs when there is an error in the page layout that is being modified. Clearly the error description is wrong and misleading :)

SharePoint 2010 - How to easily create links to existing SharePoint content in HTML Editor

What?

How to easily create links to existing SharePoint content in HTML Editor using [[ and Ctrl+Space?

 Why?

It is a common requirement to provide links to existing pages/documents/list items in SharePoint sites. This is especially true with wikis and publishing sites.

How?

While it is not difficult to copy the actual content urls manually, SharePoint 2010's HTML Editor offers a quick and convenient way to create links to existing content. This is especially useful when there is a need to create a new page during content contribution.

Tuesday, June 12, 2012

How to fix "System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.SharePoint.SPField.GetTypeOrBaseTypeIfTypeIsInvalid" ?

What?

I suddenly started to see an exception "An unexpected error has occurred" in our SharePoint 2010 site when I tried to access the site's landing page.







Wednesday, May 30, 2012

SharePoint 2010 - How to configure multiple search core results web parts on a page?

What?

How to configure multiple search core results web parts on a SharePoint 2010 page?

Why?

So what's a big deal in dropping multiple search core results web parts on one page?

When multiple search core results web parts exist on a page each with own query specified in either "Append Text To Query" or "Fixed Keyword Query", then one of the search core results web parts returns wrong results.


Monday, May 21, 2012

SharePoint 2010 pages throw JavaScript error "SP.Ribbon.PageState is null" when we try to connect 2 web parts on a publishing page

What?

SharePoint 2010 pages throw JavaScript error "SP.Ribbon.PageState is null" when we try to connect 2 web parts on a publishing page

Why?

Don't know :) but I know a fix

Wednesday, May 16, 2012

SharePoint 2010 - Unable to attach debugger to custom workflow built using Visual Studio

What?

I have been developing a custom workflow for SharePoint 2010 using Visual Studio 2010. I have attached it to a library and started to debug it. The debugger got attached right the first time. But after making some code changes and redeploying the workflow, I was unable to attach debugger to my custom workflow anymore!

Monday, April 16, 2012

SharePoint 2010 - How to calculate the number of Web Front Servers (WFEs) / Web Servers required for my sharePoint 2010 site?

What?
How to calculate the number of Web Front Servers (WFEs) / Web Servers required for a SharePoint 2010 site?

Why?

Capacity Planning in SharePoint 2010 is a complicated and confusing topic and there's not a whole lot of really good documentation around it.

There are so many factors that affect your planning in this area that it is almost impossible for anyone to come up with a solid number. Your performance would be affected by the server hardware, the client hardware, the concurrency rate of your users, the throughput rate required, the response time your organization deems acceptable etc.

SharePoint Search: How to exclude part of a page / partial page from being indexed by SharePoint Search?

What?

How to exclude part of a page / partial page from being indexed by SharePoint Search?
Out of the box, SharePoint provides a mechanism for excluding publishing pages from the search index by any number of criteria, but what if you want to exclude only parts of a page? This becomes useful when you have content on numerous pages that contains common keywords. 

Why?

Scenario 1:

For example, say you have a search results webpart in your page layout to display your latest press release: "Product A just announced". That means all the pages that are created using that page layout will have "Product A" in them.  When someone performs a search for "Product A" they will get back every page in your site that is created using that page layout, instead of just the press release and related product pages. To prevent this, we need to prevent SharePoint from indexing that content when it’s performing a crawl.
OR
Scenario 2:

You want to index a regular non-SharePoint web site. Usually, it’s your company’s public-facing web site. That site has common navigation on every page with terms such as Contact, Locations, Privacy Policy, About, etc. that you don’t want to be indexed. If it is indexed, every time a user types in "contact", they end up having every page on the site returned in the search results.

Monday, January 30, 2012

How to tune SharePoint 2010 Server for better performance?

What?

How to tune SharePoint 2010 Server for better performance?

Why?

SharePoint has an array of areas where performance is an issue and bottlenecks occur. It is particularly important for public web sites, but Intranet sites & collaborative sites benefit from this as well. In this post we will learn how to tune SharePoint 2010 for better performance.

How To Customize Current Navigation (Left Navigation) in SharePoint 2010 To Show Multiple Levels?

What?

SharePoint 2010 has a limitation that it only shows up to 2 levels of navigation items at any given time in any page in the current navigation (aka current navigation).

Let us take a typical scenario where I have my site structure as defined below:

Root site
  Team Site
  Subsite Level 1
    Subsite Level 2
      Subsite Level 3

How to create a generic list with anonymous types in C# 3.X

What?

How to create a generic list with anonymous types in C# 3.X

Why?

Anonymous Types is a new feature that is introduced with C# 3.0
Anonymous types are particularly useful when querying and transforming data with LINQ.

So what’s the difference between a normal type and an anonymous type?
First and most important: the anonymous type has no type name.

SharePoint 2010 - How to Backup/Restore Managed Metadata from one farm to another?

What?

SharePoint 2010 - How to Backup/Restore Managed Metadata from one farm/environment to another?

Why?

You will be amazed by the lack of proper import/export functionality.

It is quite a general requirement to migrate Managed Metadata Service / Termsets from one environment to the other.

SharePoint 2010: User Profiles configured correctly but people search not working

What?

Is the user profiles service application configured correctly but people search not working?

As you can see in the below screenshot, the user profile service is able to synchronize properly with AD and pull user profiles.


When I searched for a user from a SharePoint site using people search results web part, no profiles were returned. I have also tried the query service web service (/_vti_bin/search.asmx) with no luck.

Incomplete SharePoint 2010 SPWebPartManager and its events that are never raised

What?

Incomplete SharePoint 2010 SPWebPartManager and its events that are never raised

Why?

The SPWebPartManager in SharePoint 2010 is incomplete.
Some of its events are never raised and even if they are raised they don't work as expected.

Recently I was working on a scenario where I had to restrict users from being able to add certain web parts to certain web part zones in the page.

There is no such property in the web part zone that we can use to achieve this kind of functionality.

Thursday, January 19, 2012

How to enable drag/drop of files in Visual Studio 2010 / GAC when running as an administrator?

What?

How to allow drag/drop of files in Visual Studio 2010 / GAC when running as an administrator?

Why?

When running as administrator in Windows Server 2008, programs such as Visual Studio 2010, GAC (explorer) wont allow users with even administrator rights to be able to drag and drop files.