Recently we faced some problems who were are all related to the default language settings in the managed meta data termstore. If you face any of these problems, check the default language of the Managed Meta Data Termstore.
A workaround for these problems is to set the default language of the Termstore back to English. To do so, go to the Managed Meta Data Termstore and set the default language to English. Some functionality require running the social timer jobs and a full crawl of the content sources as well.

Updating Ask me About property fails
If you have implemented User Profiles in SharePoint 2010 you might discover that adding new terms to the “Ask me about” field will cause your Web frontend to hit 100% CPU. After a while Asp.Net will give up with a Thread Abort Exception and a nice error with a CorrelationID. Unfortunately the CorrelationID will not bring you anywhere. The “Ask me About” WebPart responsible for showing the text on the profile home page is responsible for this behavior. Changing the Default Language of the Term Store back to English solves the problem.
Labels on User Profile page don’t shop up
If you tag (Tag It functionality) a SharePoint item with a label, these items with there tagged label will show up on the tag profile page (tagprofile.aspx). Here you can see all the items that you have tagged. A cool functionality is that you can also see if there are items tagged by other users with the same label. This cool functionality witch will be covered in my next blog post uses SharePoint search with keyword SocialTagID=”Your Label”. Unfortunately these items will not show up if the default language is not set to English in the managed meta data store.
Tagprofile.aspx page

Search all items of the label uses the Guid of the label with the keyword SocialTagID.

No refinements in search for Social tags
If you have users who used the tagging functionality to add context to the items in SharePoint 2010, then the used tags should show up as refinement keyword in the refinement panel of enterprise search. However, if you have installed a language pack and set the default language to the installed language pack, the social tags will not show up in the refinement panel. After changing the Default language of the Term Store back to English running a the social timer jobs and doing a full crawl will fix this problem.

Keep in mind that this is a workaround, not a solution to the problem!
In this zip file you can find the sample code of the demo’s that Ton Stegeman and I did (weblog and Twitter) It is 1 Visual Studio solution that contains these projects:
- SDC.Demo.ManagedMetadata
- Sample for creating a managed metadata field from a feature. Associate the managed metadata column to a content type. Attach the content type to a list.
- Sample Powershell script for importing a termset
- Web part that does a search query for a managed metadata field. Sample allows you to find content using specific terms, or content using the selected term and all underlying terms in the hierarchy.
- Web part contains an example of the query object model and the new federated search object model.
- SearchForSocialTags
- Code sample that shows you how to create a search query for a social tag. This way you can run search queries and find content that are tagged by users using “I like it” or SharePoint labels.
- SetDefaultValue
- Code sample to set the default value of a managed metadata field to a specific term. The sample sets the default value of a termstore field on a list.
- SetTaxonomyValue
- This code sample shows you how to set a value of a managed metadata field for a listitem to a specific term.
- WindowsFormsApplication1
- This sample application creates a CAML query to query a list and find all items that have the same term as the specified term. It also has the option to find all items that have either the same term or any of the terms lower in the hierarchy.
The slides for the session can also be downloaded.
Enjoy, Donald and Ton
Recently Microsoft launches there latest innovation from Live Labs named Pivots. Pivots is an application for visualizing rich amount of data by using the PivotViewer Silverlight control. The control allows you to categorize your data based on the metadata it retrieves. By using the Silverlight DeepZoom technology, image collections will become alive.
So how cool would it be if we could use SharePoint 2010 as a data provider and host for the PivotsViewer Silverlight Control?
The Pivots SDK ships with a CXML HttpHandler that loads all factory classes from the application bin folder. One of the provided factory classes is based on the OData protocol. The OData protocol is a REST based protocol which is increasing in popularity and is used in several Microsoft products like Azure and SharePoint 2010. The ListData.svc services in SharePoint 2010 can be used for retrieving collections (all the libraries) and the items of the collection (all the items of a library). When an item contains an image URL, it will automatically render a DeepZoom Collection. For items that not contain an image, it will render a box containing the title of the item.
Take a look at the video.
The solution
The solution contains a proof of concept implementation of the Live Labs Pivot with SharePoint 2010. It includes 2 library projects and 2 SharePoint projects for deploying the solution to SharePoint.
The SharePointPivots solution contains the PivotSilverlightWebpart and the registration of the 5 HttpHandlers. The actual implementation of the handlers can be found in the PivotServerTool library project.
The SharePointPivots.Install solution is responsible for the registration of the HttpHandlers in the Web.config . The Web.Config modifications are done by the WebConfigModifications feature. The feature contains a FeatureReceiver which uses the SPWebConfigMoifications class to update the web.config.
The SharePoint project contains the Silverlight XAP file which will be deployed to the Layouts directory. I didn’t include the Silverlight file itself because it requires the Silverlight 4 Development tools. If you are interested in the Silverlight project, simple download the SDK from the Microsoft Live Labs Pivot SDK here. http://www.getpivot.com/developer-info/jit-tools.aspx.
The PivotServerTools project comes from the SDK example and contains helper classes for the HttpHandlers.
The CollectionFactories project comes from the SDK example as well. It contains so called CollectionFactory classes. These classes are responsible for retrieving the data and mapping the items to Facet classes. The SDK ships with CollectionFactory classes for Sql, FileSystem images, SQL Azure, Twitter and as previously mentioned OData.
Deploy
You can either deploy both WSP solutions by using STSADM or you can use Visual Studio 2010 to deploy the Solutions. The SharePointPivots.wsp will be deployed to the application bin folder. Because of that, it needs a CAS policy. I didn’t include the CAS policy because the deployment in Visual Studio 2010 will fail when you add a CAS policy to the manifest. This is a known issue as stated here http://support.microsoft.com/kb/2022463.
To keep thing simple you can set the trust level of your webapplication to full. Update the web.config with: <trust level="Full" originUrl="" />
If you don’t like this (which is good!), update the manifest with a CAS policy and deploy the solutions by using STSADM or powershell.
Once deployed, go to Central Admin and deploy the SharePointPivots.Install solution to the webapplication you want. Let’s say http://intranet. This will add the HttpHandlers sections to the web.config of the webapplication.
Go to the website http://intranet and make sure the sitecollection feature SharePointPivots Webpart is activated. Now its time to add the SharePointPivots webpart to the page. Go to any page you want and add the webpart to the page. Configure the webpart by going to the Edit Webpart properties.
Go to the property “Select a Factory Provider”. Choose “OData.cxml?src=http://intranet” and click the Apply button.
Trouble shooting
If you don’t get any data returned by the listdata.svc service, check if the ADO.NET data services are installed correctly. To do so, simple run any url with /_vti_bin/listdata.svc. If it gives the exception “Could not load type ‘System.Data.Services.Providers.IDataServiceUpdateProvider” reinstall an update of the ADO.NET dataservices from http://support.microsoft.com/kb/976127
Have fun but keep in mind it is still a proof of concept implemention!
During the Microsoft SharePoint Connections 2010 in Amsterdam someone from the audience came with the question ”how to add a YouTube movie to a publishing page in SharePoint 2010”. According to the attendee, the content editor corrects or filters the html / object tag inside the rich text editor of a YouTube movie. So back at home, I tried to figure this out. You can add a YouTube movie to a page by adding the embed tag of the movie. For example
<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/GgHoxwESqtI&hl=nl_NL&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/GgHoxwESqtI&hl=nl_NL&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>
My first try was to paste the HTML by going to the HTML editor mode. You can do this by selecting the content editor web part and go to HTML à Edit HTML Source. By pasting the embed tag for the YouTube movie, the YouTube movie appeared in the page. However, after doing several page edits / check-in / publishing etc, the YouTube movie didn’t show up anymore. After investigating the HTML, it looks liked the content editor encoded parts of the inserted HTML. This makes sense, in order to comply to the XHTML rules.
In my search for disabling the encoding behavior of the content editor, I found a new property in the property pane of the web part called Content Link. By setting the Content Link property to a document which is uploaded to your SharePoint site, the Content Link property will load the content and insert that inside the content of the Content Editor web part.
So what I did is the following. I created a text file with the embedded html for the YouTube movie and uploaded that to the document library of the site. I then configured the Content Link property in the web part panel (go to edit properties of the rich text editor web part) to “/documents/youtube.txt” (use test link before click apply). After that, the content editor web part loads the content of the file and shows the YouTube movie. It turns out that this content is not encoded anymore after edit, check in – publish actions J
Today at the second day of the Microsoft PDC in Los Angeles Microsft announced the public Beta for SharePoint 2010 and Office 2010. While the Technical preview was only available for some of the MVP's / MCM's and early adapters. The public BETA is now available for the SharePoint Community. So what is in the box:
- SharePoint Foundation 2010 (formerly known as WSS)
- SharePoint Server 2010
- FAST Search Server 2010
- Project Server 2010
- SharePoint Designer 2010 (free)
- Office 2010
- Office 2010 for mobile
- Office Web Applications
One of the many new features in SharePoint 2010 is the support for social networks. New in this Beta which was not previously announced is the Outlook Social Connector. The Outlook Social Connector brings social networks to your inbox. While browsing through your email, you can now see information from social networks. First social network who will make a plugin available is Linked In. Later this year, a connector for Windows Live will become available as well. The Social Connector also ships with a SDK for integrating your own connector for enabling your backoffice HRM system.
For more information see the blog post at the Microsoft Outlook Team Blog.
The public Beta of SharePoint 2010 can be downloaded at http://bit.ly/ZF2010
Microsoft Netherlands will organize a two day event on 18 and 19 January for SharePoint IT-Professionals and Developers. This conference will cover many of the existing announcements and highlights of the International SharePoint 2010 conference held in Las Vegas. If you want to learn more about the coming SharePoint 2010 version, than this is the place to be. International top speakers like Steve Fox, Spencer Harbar, Neil Hodgkinson, Richard Taylor, Asif Rehmani and Jan Tielens already confirmed.
Check out the website at http://www.devconnections.com/shows/NED2010SP/default.asp?c=2&s=149
Ever needed a solution where several webparts on the same page are consuming the same datasource? Webpart connections can be the solution!
In one of my current projects we have a profile page with several web parts were each webpart shows a part of the user profile information. For instance:
- a webpart with the basic profileinformation like name, phone and profilepicture.
- a webpart for showing the favorite links stored in the userprofile
- a webpart for showing the skills of the user, stored in the userprofile
In this scenario, each webpart has to retrieve the same userprofile information. This is a little bit sad considered the performance penalty being paid for retrieving the same data for each webpart. Considered the penalty, i wanted a solution which only loads the userprofile once.
In a traditional Asp.Net website, the code behind of the page would be responsible for retrieving the data and pass that data to the webparts by using a public property on the webpart. SharePoint publishing pages don’t have the ability to have code behind files. So we need a different kind of solution.
I could created a dataaccess layer for retrieving the userprofile data and cache the profile for several seconds so that the other webparts could read this data from the cache.
Just before writing the dataaccess and caching code, i wondered whatever it was possible to achieve this by using webpart connections. See it like data provider webpart and a data consumer webpart.
To keep it short. I came up with the following solution.
I created a custom webpart witch implements the IUserProfileData interface. This interface defines the contract of the data being send through the webpart connections.
public class UserProfileData
{
public string FistName { get; set; }
public string LastName{ get; set; }
public string PictureUrl { get; set; }
}
public interface IUserProfileProvider
{
UserProfileData ProfileData{ get; }
}
The easiest way to communicate between webparts is by using the ConnectionProvider and the ConnectionConsumer attribute. All you need to do in the provider webpart is implementing a method with the ConnectionProvider attribute. The webpart infrastructure will deal with the communication callbacks between the webparts
[ConnectionProvider("ProviderID")]
public IUserProfileProvider GetUserProfileProvider()
{
return this;
}
All the consumer webpart has to do is implement a method with the ConnectionConsumer attribute for retrieving the provider.
[ConnectionConsumer("ConsumerID")]
public void RegisterUserProfileProvider(IUserProfileProvider provider)
{
this.provider = provider;
}
The final step is to create a webpart connection between the provider and the consumer webparts. This can be done by using the SharePoint userinterface.
Example code can be downloaded here. If you want to deploy the example, make sure you have STSDEV(can be found on codeplex) installed. Want to know more about webpart connections? Read this excellent article on MSDN (http://msdn.microsoft.com/en-us/library/ms178187.aspx).
I have been quite busy last months with presenting at several conferences, finishing projects, but most of all attending the Microsoft Certified Master Program. Once again, the organisation of the Developers Days did a great job in selecting sessions and speakers from all over the world. With a line up of David Chappell, Mike Taulty, Ingo Rammer, Keith Brown, Gert Drapers, Aaron Skonnard, and many more, they may have one of the best conference in europe. I did the session "Web Content Management with Microsoft Office SharePoint Server 2007" together with my colleague Reinhard Brongers. The session is recorded and hosted at Channel 9. For those who understand the dutch langauge, have fun!

In the demo's we showed a jQeury menu, jQuery image webpart and a Silverlight 2 video player field control. The source code can be downloaded here. The solutions are just for demoing purpose only, so do not use it in production. Before you open the solution in Visual Studio 2008, make sure you have installed Visual Studio SP1, .NET framework 3.5 with SP1, Silverlight 2 and the Silverlight tools for Visual Studio 2008 SP1. If you want to deploy the solution, install STSDEV, and make sure you have configured youre website for Silverlight (.xap extension in IIS) and the .Net framework 3.5 SP1 (web.config modifications). Deploying and configuring a SharePoint solution with Silverlight can be hard. For a basic walkthrough of developing a Silverlight Webpart take a look at the MSDN Ramp up for SharePoint
The attached solution includes:
- Sitedefintion for Devdays2009
- Masterpage
- Pagelayouts
- Fieldcontrol for Silverlight 2 player
- Image carousel webpart with jQuery
- jQuery menu
Have fun!
Just back from my MCM SharePoint experience in Redmond I received an email from the dutch Software Development Network (SDN) organisation to give a talk on friday june 26th. It seems that Bob Fox couldn't make it, so they needed a stand-in. Duo presentations are my favorite, so I was lucky that Mirjam van Olst wanted to join the presentation about Architectural Design and Development Considerations. Despite the short preperation time and beeing jetlagged, I think we did a good job. For those who are interested in the sql scripts, they can be downloaded here.
Recently I did a couple of projects on building public facing internet sites with MOSS 2007. I’ve noticed that for one specific project the application pages and the forms pages were accessible for anonymous users. Because of the fact that anonymous users have by default no rights on lists other than read, they can't do any harm to the site. But I didn't like the idea that anyone could read my reusable content or pages list just by requesting the url http://myserver/pages/forms/allitems.aspx. In my search for an explanation, I found this excellent article from the SharePoint team blog. Public internet sites build on the publishing portal site definition have by default a feature called ViewFormPagesLockDown activated. The feature disables anonymous users to forms pages and most of the application pages. If you build your own site definition, this feature is not enabled by default. You still can disable anonymous access to these pages by activating the ViewFormPagesLockDown feature to the site collection of the public website. You can do this by running the following command on the site collection of the public site:
stsadm.exe –o activatefeature –url <site collection url> -filename ViewFormPagesLockdown\feature.xml