Service Pack 2 for SharePoint Server 2010 is now available.

Service Pack 2 for SharePoint Server 2010 is now available.
The pack addresses security, stability, and performance and provides better compatibility with Windows 8, Internet Explorer 10, Office 2013, and SharePoint 2013.

In addition to the new functionality Service Pack 2 provides, as with all Service Packs, it includes a number of fixes designed to improve your experience with SharePoint 2010 and includes all Cumulative Updates through April 2013 and Public Updates through May 2013.

More information:

VN:F [1.9.22_1171]
Rating: 10.0/10 (2 votes cast)
VN:F [1.9.22_1171]
Rating: +1 (from 1 vote)

Visual Studio 2010 SP1 and Moling the system dll

Personal reminder because I keep forgetting this step…


  1. Visual studio 2010 SP1
  2. Moles installed
  3. Building SharePoint unit tests using behaviors
  4. Required to create mole assembly based on the systems.dll
  5. receiving lots of built error including: “System.Net.Moles.SFileWebResponse.Dispose(bool)’: no suitable method found to override”

Try updating the System.moles file to use reflection only:

There I fixed it!

Happy SharePoint unit testing :)

More info:

VN:F [1.9.22_1171]
Rating: 9.3/10 (3 votes cast)
VN:F [1.9.22_1171]
Rating: +3 (from 3 votes)

Moles are dead, long live Fakes

I’m a huge fan of the Microsoft Research Project called Pex and Moles.
Therefor I’ve mentioned them several times on this blog and demonstrated their power on the community day event in 2010.
Especially moles, because they allow us to fake the very closed SharePoint objects in our Test projects and make our lives as SharePoint legends much easier.

There is bad and good news about Moles:

Moles are dead
The Moles project is *not* actively developed anymore…

Long live fakes
The Fakes Framework in Visual Studio 11 is the next generation of Moles & Stubs, and will eventually replace it.

What now?

The Fakes Framework in Visual Studio 11 is the next generation of Moles & Stubs, and will eventually replace it.
Fakes is different from Moles, however, so moving from Moles to Fakes will require some modifications to your code. A guide for this migration will be available at a later date. Until then, please keep sending bug reports to, and ask questions on stackoverflow. The Pex and Moles team will release an update of Pex for Visual Studio 11 when the final release becomes available. Moles will not developed further so we recommend to migrate to Fakes.

VN:F [1.9.22_1171]
Rating: 9.0/10 (2 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Windows PowerShell Command Builder – Silverlight Tool for SharePoint Administrators

This SilverLight tool guides you in an interactive WYSIWYG way while you are creating your SharePoint PowerShell commands.

This little gem could be useful for everyone, but it is a powerful learning tool for those who are new, interested and motivated to learn the power of PowerShell in combination with SharePoint.

You can use the silverlight application from HERE

The Windows PowerShell Command Builder enables IT professionals and power users to visually assemble commands related to SharePoint 2010 Products and Office 365 on a Design Surface in a browser and take those commands to their respective products. The Windows PowerShell Command Builder provides an intelligent user experience. After you drag a verb or noun object on the Design Surface, the interface will hide either the verbs or nouns that are not associated with the verb or noun placed on the Design Surface. After you construct a command, you can copy the command to Windows PowerShell script, the SharePoint 2010 Management Shell, or other desired location to be saved or executed.

Getting started guide:

TIP: You can install it on your desktop (right-mous-click on the application).

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Next BIWUG session September 8th at RealDolmen

BIWUG, the Belux Information Worker User Group – – is announcing another session about SharePoint 2010 on Thursday September 8th 2011 in the RealDolmen Huizingen offices.

18:00-18:30 Welcome with sandwich lunch
18:30-19:30 SQL Server for SharePoint Geeks
(Speaker – Thomas Vochten – @Thomasvochten).
Topics: which SQL Server editions to use, configuration best practices, common misconceptions and its impact on SharePoint.

19:30-19:45 Break

19:45-20:45 Office 365 – but mainly SharePoint Online – from a technical perspective
(Speaker – Joris Poelmans – @jopxtwits) Topics: focus on SharePoint Online both from an administrator and developer standpoint.

RealDolmen Industriezone Zenneveld, Vaucampslaan 42, 1654 Huizingen, Belgium (Roadmap in PDF format)

Entrance is free but registration is required on the BIWUG site – .

Hope to see you there.

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

SharePoint 2010 custom TimerJob Installation With PowerShell

If you would like to create a custom timerjob you can follow the excellent blog of Andrew Connell.
A hidden site collection feature could do the trick, but I prefer a PowerShell script that can be executed during the installation of the solution.

#Installation script for custom timerjobs

# These variables should be set by the developer because they are environment independent
$customAssemblyName = "tvg.customtimerjob"

# Use the same name as defined in the timerjob constructor
$jobName = "Custom Job"

# Use the namespace and the classname combined.
$timerJobClassName = "tvg.customtimerjob.CustomTimerJob"

# This needs to be assigned by the admin because the script needs to beenvironment independant
#$siteUrl = "http://spf-dev/"
$siteUrl = Read-Host "Site Url";

# load the required assemblies

function Run-Init
    $global:s = [Microsoft.SharePoint.SPSite]$siteUrl
    $global:webApplication = $s.WebApplication
    $global:job = $webApplication.JobDefinitions | ? { $_.Name -like $jobName }

function Create-NewJob
    Stop-Service "SPTimerV4"
    Start-Service "SPTimerV4"
	# Delete the previous sheduled timerjob
	if ($global:job) {
	# Create a new timerjob object
    $global:job = new-object $timerJobClassName -ArgumentList $jobName,$webApplication
	# Create a new daily shedule, this can offcourse be any other available Schedule
	# More info:
    $sched = new-object Microsoft.SharePoint.SPDailySchedule
    $now = [datetime]::now.AddSeconds(10)
    $sched.BeginHour = $now.Hour
    $sched.EndHour = $now.Hour
    $sched.BeginMinute = $now.Minute
    $sched.EndMinute = $now.Minute
    $sched.beginsecond = $now.Second
    $sched.endsecond = $now.Second
	# Set the schedule to the timerjob object and save the job schedule
    $global:job.Schedule = $sched


Hope it helps,


VN:F [1.9.22_1171]
Rating: 9.7/10 (3 votes cast)
VN:F [1.9.22_1171]
Rating: +1 (from 3 votes)

SharePoint XSL web part with custom xsl for contacts list

In my previous post
I explained how you can create a new interface for a specific list by using the XLV webpart.

This post demonstrates how you can extend the the list view webpart of a list based on the out-of-the-boc contact list template.

Copy paste the following code in an xsl file and upload it in the style library.Tthe final step is to link the listview webpart with the xsl in the style in the style library and your done!

Download the xsl file here:

          padding-left: 30px;
          background:  transparent url('') no-repeat 0 0;

        .employee ul{
          list-style-type: none;

          border:1px solid silver;
          color: #fff;
          /* fallback (Opera) */
          background: #008800;
          /* Mozilla: */
          background: -moz-linear-gradient(top, #A2C5DE, #387BAB);
          /* Chrome, Safari:*/
          background: -webkit-gradient(linear,
                      left top, left bottom, from(#A2C5DE), to(#387BAB));
          /* MSIE */
          filter: progid:DXImageTransform.Microsoft.Gradient(
                      StartColorStr='#A2C5DE', EndColorStr='#387BAB', GradientType=0);

Hope it helps,

VN:F [1.9.22_1171]
Rating: 5.0/10 (7 votes cast)
VN:F [1.9.22_1171]
Rating: +1 (from 3 votes)

SharePoint XSL web part with custom xsl

The new XSLT List View Web Part (XLV Web Part) in SharePoint 2010 allows a new level of SharePoint customization and allows us to create custom webparts in an easier way. I hope this post guides you if you would like to create a custom xsl definition for a specific list.

1) Add the following xsl file in the TEMPLATE/LAYOUTS/XSL folder and name it xml.xsl.
This will make the xsl available on each sharepoint site by using /_layouts/xsl/xml.xsl

Download the xsl file here:

      <xsl:copy-of select="*"/>

2) Add a new list view webpart and open the webpart properties screen. Under the category miscellaneous there is a textbox where you can provide a new xsl file reference. Provide the link to /_layouts/xsl/xml/xsl

3) The transformation will (html) encode the source xml and display the result in the browser, copy the xml and store it in your solution as listdata.xml. We will use this xml file to debug our custom xsl definition.

4) Add a new xsl file into the visual studio solution. Copy Paste the following example in the xsl file, it will visualize a collection of divs where each div contains the title value of each row.


5) Open the XML menu in visual studio and click on Start XSLT Debugging/b> of use ALT+F5.

6) Visual studio will ask you where it can find the source xml, this is the raison why we created the listdata.xml in our current solution and create a new xml file where the result will be stored in. This result file will contain the html code that will be displayed in the list view webpart.

Hope it helps,

VN:F [1.9.22_1171]
Rating: 7.3/10 (21 votes cast)
VN:F [1.9.22_1171]
Rating: -1 (from 7 votes)

Integrating knockout.js and SharePoint 2010

Recently I watched the following MIX conference session about konckout.js by Steve Sanderson
Even if you never have heard of knockout.js I defenitly recommend you to take a look at it, they placed a lot of effort in the documentation that is available here.

knockout is a library that can be used side by side with jQuery and other libraries but it makes your live as a web developer much easier, interested? :)
The documentation on the website states:
Knockout is a JavaScript library that helps you to create rich, responsive display and editor user interfaces with a clean underlying data model. Any time you have sections of UI that update dynamically (e.g., changing depending on the user’s actions or when an external data source changes), KO can help you implement it more simply and maintainably.

Basically it allows you to data-bind values to html elements, when the javascript object value changes… the value in the html element changes automatically with it. This can be done without knockout, but it would cost you a lot of event binding and maintenance.

The example I prepared is a sandboxed solution that adds the required javascript files and a demo page to the site assets library. It uses the buitlin SharePoint REST service to retrieve the values and when you select a specific file, display the details of the file.

Step 1: Provision the javascript references as custom actions in the head of each page.


Step 2: The demo page content
This demo page is not the perfect startup example, because it combines jQuery, Rest, knockout viewmodel and knockout templates in 1 page.
In my opinion it is the combination of these 4 elements that makes it for us as SharePoint developers very interesting.

Page Actions:
1) We use jQuery to call the REST service and when the results are returned we bind them to a helper class.
2) A viewModel is created and the helper class objects are added as an observableArray.
3) The data-bind attribute is set to a select html element, this will set the values of the observableArray as elements in the combobox.
4) The applyBindings method is called on the knockout object, this will make sure that all the values are set to the correct bindings.

The content of the sharepoint page should look like this:

The example solution can be downloaded here:
  download tomvangaever.knockoutjs

Hope this helps,

VN:F [1.9.22_1171]
Rating: 9.1/10 (7 votes cast)
VN:F [1.9.22_1171]
Rating: +4 (from 4 votes)

SharePoint 2010 autocomplete textbox containing listitems


A simple textbox where users type in a certain value. based on the this value,a suggestion appears by searching the values of a specific field in a specified list.
The solution has to be easy to maintain, performance is very important (more than 100 000 items) and it has to support all the browsers that SharePoint 2010 supports.
finally, it has to be a sandbox solution.


Used technologies:

  • out-of-the-box SharePoint 2010 REST Services
  • JQuery & JQuery UI


<script language="ecmascript" type="text/ecmascript">

// Settings
var url = "http://vwds242/_vti_bin/listdata.svc/Large()";
var field = "Title";

// Onload
$(document).ready(function () {
		source: function (req, add) {
			var suggestions = search(req.term, url, field);

// Search all the listitems by using the REST Service
// Value is the text that needs to be used in the query
// listurl is the listdata.svc url withouth the filter params
// field is the name of the field where the value in exists
function search(value, listurl, field) {
	var coll = new Array();
	var url =
		listurl + "?$filter=startswith(" + field + ",'" + value + "')";

		cache: true,
		type: "GET",
		async: false,
		dataType: "json",
		url: url,
		success: function (data) {
			var results = data.d.results;
			for (att in results) {
				var object = results[att];
				for (attt in object) {
					if (attt == field) {
	return coll
VN:F [1.9.22_1171]
Rating: 8.2/10 (45 votes cast)
VN:F [1.9.22_1171]
Rating: +5 (from 15 votes)