Thursday, 20 November 2008

Why "ItemUpdated" fires 2 times ?

I have a document library with an "ItemUpdated" item eventreceiver. Each time I upload a document, the eventreceiver fired 2 times in two different threads, with update conflicts as a concequens.

When you use check-in/check-out on your document libraries the check-in action also fires an ItemUpdated event. If found this information here (good article!):

We need to check which "ItemUpdated" we deal with ... the one from the check-in or the 'real' one. If found this code on the MS site to check the source of the event:

if (properties.AfterProperties["vti_sourcecontrolcheckedoutby"] == null && properties.BeforeProperties["vti_sourcecontrolcheckedoutby"] != null)
//This is when the update event is triggered by
//This is triggered by events other than check-in


Wednesday, 12 November 2008

Moss 2007 Database Migration - Diskspace Usage and Upgrade time

I'm currently working on a database migration SharePoint 2003 to Moss 2007.  One of my concerns was the diskspace usage during the migration.

In a previous post i wrote that a gradual upgrade can take up to  6,19 times the original diskspace.  So i had reasons to worry ...

I can tell you, a database migration takes less space, here are my test results:


Content Database 1 (+/- 12 GB)

  Before Migration After DB Migration
DATA File 11.706.624 kb 11.706.624 kb
LOG File 20.096 kb 1.219.712 kb

Logfile growth / data file = 10,42 %

Content Database 2 (+/- 58 GB)

  Before Migration After DB Migration
DATA File 58.035.584 kb 58.035.584 kb
LOG File 20.096 kb 9.930.624 kb

Logfile growth / data file = 17,11 %

Content Database 3 (+/- 18 GB)

  Before Migration After DB Migration
DATA File 17.139.776 kb 17.139.776 kb
LOG File 26.816 kb 1.321.088 kb

Logfile growth / data file = 7,71 %


The upgrade time of the DB migration depends on the hardware AND the features you want to activate during the migration.  I did a test activating the publishing features during the upgrade.

Database 1 - without publishing features : 15 minutes
Database 1 - with publishing features : 1 hour 40 minutes

Database 2 - without publishing features : not tested
Database 2 - with publishing features : 1 hour 53 minutes

Database 3 - without publishing features : 12 minutes
Database 3 - with publishing features : 51 minutes


  • The DATA file does not grow
  • The LOG file grows between 7% and 20% of the datafile
  • The upgrade time of the migration is short but depends on the features you want to activate during the upgrade.

Visual Studio 2010 Tools for SharePoint

A summary of what we can expect:

  • Server Explorer for SharePoint viewing Lists and other artifacts in SharePoint directly inside of Visual Studio

  • Windows SharePoint Services Project (WSP file) Import to create a new solution

  • Added a new web part project item and showed the Visual web part designer which loads a user control as a web part for SharePoint

  • Showed adding an event receiver for SharePoint and using the wizard to choose the event receiver and to just create a source file with that event receiver.

  • Added an ASPX workflow initiation form to a workflow project and showed how this workflow initiation form has designer capability

  • Showed the packaging explorer and the packaging editor which lets you structure the SharePoint features and WSP file that is created


Sunday, 5 October 2008

Looking for some samples on Moss 2007 WCM ?

Here you can find about 100 websites build on SharePoint 2007 WCM:

Sunday, 28 September 2008

Can you run Moss 2007 on .Net Framework 3.5 ?

Microsoft says YES !  So you can use the latest features in your SharePoint Applications.image


Resources for installing Moss 2007 on Windows Server 2008

I'm currently setting up some virtual development machines based on Windows Server 2008.  Before I started I collected some resources on the net.

One importing thing, use always the installation files with Service Pack 1 included otherwise your installation will fail.

Installing Moss 2007 on Windows Server 2008:

SQL Server 2008 deployment on Windows Server 2008 by Dell

Deploy a simple farm on the Windows Server 2008 operating system (Windows SharePoint Services)

Install a stand-alone server on Windows Server 2008 (Windows SharePoint Services)

Upgrading to Windows Server 2008 for Windows SharePoint Services 3.0 with SP1

Perform a stand-alone installation of Office SharePoint Server 2007 on Windows Server 2008

Deploy a simple farm on the Windows Server 2008 operating system (Office SharePoint Server)

If you are using SQL Server 2005 for your installation:

FIX: SQL Server 2005 is not installed on a Windows Web Server 2008-based system

How to install and how to configure SQL Server 2005 Reporting Services on a computer that is running Windows Server 2008

SharePoint Infrastructure Update

Some months ago I blogged about MS Search Server 2008 and the Federated Search.  Some weeks ago (finally) Microsoft released the update that adds the federated search functionality for the Moss 2007 users.  I made a summary of the links for easy downloading:

Key updates for SharePoint Server 2007 include:

  • New Search features such as federated search and a unified search administration dashboard.
  • Several core fixes to Search to improve performance and scale.
  • Platform performance improvements and fixes.
  • Several core fixes to the publishing Content Deployment features to improve reliability.

Key updates for Windows SharePoint Services 3.0 include:

  • Platform performance improvements and fixes.
  • Several backup and restore fixes.
  • Several core Workflow fixes.

Monday, 15 September 2008

Italy was wonderful !

It has been silent for a while on my blog, but after a nice holiday we are back!  Me and my wife went on holiday to Sorrento in Italy.  A very nice country and city, i recommend it to everyone!  We also visited Amalfi, Carpi, Ercolano, Ischia, Naples, Positano, Ravello and St. Agata, where our hotel was located.

Before we start with SharePoint stuff again, some nice pictures from our trip.  Enjoy!




Monday, 21 July 2008

How to manage multiple Remote Desktop Connections

I my job as SharePoint Consultant I work on many different customer locations with many different SharePoint servers and thus many remote server connections. 

I found a good tool to manage all my Remote Desktop connections for each customer, something better than the standard "remote desktop connection" in Windows XP or Vista.

and ... it's a free tool ...

visionapp Remote Desktop (vRD 1.5)
You can download it here:

There is also a more advanced version available
(read: you have to pay for it ...) visionapp Remote Desktop 2008


visionapp Remote Desktop 2008 (vRD 2008) is a powerful tool for managing and accessing multiple Windows servers and desktops via RDP (Remote Desktop Protocol).

There is a nice comparison sheet between the free and the pro version:

Previously i used Royal TS

but Visionapp has one big difference that you can define your user accounts centrally so if your password changes, you can update it once and all your Remote Desktop connections are up to date.  With Royal TS i need to update them one by one.

Monday, 14 July 2008

How to install Forms Based Authentication (FBA) in SharePoint 2007

Last week i needed to install Forms Based Authentication (FBA) in SharePoint 2007.

This article was a good help for me:

Configuring Forms Authentication in SharePoint 2007

Once configured you need a good solution to manage the users and roles for your site and if possible IN SharePoint and not in another application.  I found a cool project on Codeplex that had these requirements!

Forms Base Authentication Tools and Utils for SharePoint 2007


Click here if you want to see more screenshots

Why using MS Office 2007 with SharePoint 2007?

If you are using SharePoint 2007, why should you upgrade from MS Office 2003 to MS Office 2007?  Here is a list of the additional end-user benefits realized when interfacing with SharePoint 2007:

Another good article on this topic: MS Office Integration with SharePoint [Fair, Good, Better and Best]

Friday, 11 July 2008

How to hide buttons in SharePoint - SharePoint Toolbar Manager

Today i needed a solution to hide the new button in a view. If found an elegant solution on Codeplex, the "Toolbar Manager"

Toolbar ManagerThis Feature allows you to selectively show and hide menu items on the standard list/library toolbar. The feature adds a new web part to the gallery that you can place on any list/library view page. Once placed on the page, you can use the properties of the web part to show or hide menu items. This is the perfect solution for hiding a single menu item such as “Export to Spreadsheet” to prevent users from taking that action.

A complete article on this feature can be found here:!8F5DEA8AEA9E6FBB!280.entry

This feature belongs to the "SharePoint 2007 Features" on Codeplex which contains many other interesting features!

Have a look at it!

Thursday, 5 June 2008

MS Search Server 2008 Part 4 - What is Federated Search?

This is the 5th post of a serie on MS Search Server 2008:

MS Search Server 2008 Part 1 - What is MSS 2008?
MS Search Server 2008 Part 2 - Versions
MS Search Server 2008 Part 3 - Product Improvements
MS Search Server 2008 Part 4 - MS Search Server 2008 compared to MS Offiche SharePoint Server 2007


The federated search is a new search functionality that comes with the release of MS Search Server 2008. The new webparts can display search results from other non-sharepoint sources like Yahoo,, Technet, wikipedia, Flickr, ...

They can also be used to display search results form a custom database or a 3rd party application like Symantec Enterprise Vault, Coveo, EMC, ... And last but not least federated search can be used to search in remote SharePoint Farms (!!!)


  • Federated Results Webpart: connects to a single federated location and displays the top X results returned from the location.

  • Top Federated Results Webpart: connects to multiple federated locations and displays the top X results from the first location to return a result in the order of the configured locations

How does it work?

  • The server will send a query to the other search engine or application as a parameterized URL, for example :{searchTerms}

  • The external search engine returns and renders the result in a predefined XML format
  • The federated results webpart renders the xml on the screen based on the XSLT formatting rules.

All these operations are defined in one XML file, the .FLD file. FLD stands for Federated Location Definition.

This file describes the following:

  • how and when the queries will be federated to the location
  • the formatting of the results in XSLT
  • the authentication settings

Here you can download some sample connectors files + a list of the MS Partners who already have a solution for the Federated Search:

Some Screenshots

Sample of a federated results webpart showing results from MS Live search:

Sample of a federated results webpart showing results from You Tube:

Management of the Federated Locations in the SharePoint administration website:

SAP .NET Connector 2.0 and SharePoint 2007 ?

How do we upgrade webparts from SharePoint 2003 that are using the SAP .NET Connector 2.0 to SharePoint 2007.

Answer ...
First of all you need to upgrade your webpart to framework 2.0 using the SharePoint 2007 DLLs. Problem is here that there is no SAP .NET Connector for framework 2.0. (SAP .NET Connetor 2.0 is still based on Framework 1.1).

Here you can find an article describing how to use the SAP Connector in Visual Studio 2005. The solution also should work with Visual Studio 2008

Currently, SAP Connector for .NET is not supported in Microsoft Visual Studio 2005. We suggest a workaround that enables easy design-time connectivity to SAP backend systems in Visual Studio 2005 by creating the .NET Connector proxies in Visual Studio 2003 and porting them to Visual Studio 2005.

Important to know is that this component is discontinued, so they will not provide newer versions of the SAP .NET Connector. You now should use the webservices solution with SAP Netweaver.

Some extra links:

Thursday, 15 May 2008

Overview of SharePoint 2007 limitations

This is an article on Technet I want to share with you! I use it very often to make technical designs for clients:

Plan for software boundaries (Office SharePoint Server)

This article provides information to help you understand the tested performance and capacity limits of Microsoft Office SharePoint Server 2007, provides information about the test environment and test results, and offers guidelines for acceptable performance. Use the information in this article to determine whether your planned deployment falls within acceptable performance and capacity limits.

Thursday, 17 April 2008

How to add the SharePoint versionnumber in your Word 2003 / 2007 document?

You shoud think this is possible out of the box, but no luck ... The SharePoint version field is not exposed in Word 2003 or 2007. The reason is that the version field is not a default text field. So you need to look for a workaround, the most easy way is to create your onw "DocumentVersion" text field and copy the value of the SharePoint version field into the new "DocumentVersion" field with code. You need to execute this piece of code after the document has been added (ItemAdded) or updated (ItemUpdated):

This is a sample:

public override void ItemAdded(SPItemEventProperties properties)
SPListItem item = properties.ListItem;
item["NameOfYourNewField"] = item["Version"];

Here you can find the full blogpost about adding the version field in Word 2003:

If you want to know how to add the field in Word 2007, check here:

Friday, 21 March 2008

Slides MS Search Server 2008 from the BIWUG Session !

As promised, you can download here the MS Search Server 2008 slides from the BIWUG Session.

Thank you to all attendees!

Joris Poelmans also did an interesting session about "SharePoint as development platform - complaints/issues/rants ...and answers" He already made a blogpost about it!

Monday, 3 March 2008

Silverlight and SharePoint 2007 - 6 samples

Today i found 6 samples about Silverlight and Moss, the samples are with video, source code, documentation and setup:

  • Hello World
  • Silverlight navigation controls
  • Silverlight social networking webpart
  • Visual how-to center with webpart
  • Picture viewer sample
  • Silverlight custom field types
You can download the samples here:

Tuesday, 26 February 2008

Join my session about MS Search Server 2008 on BIWUG

On 20/03/2007 i will deliver a session about the search capabilities of MS Office SharePoint Server and the new product MS Search Server 2008 for BIWUG the "Belgian Information Worker User Group"

I will also demo the new federated search functionality!

20:15 - 21:30 Overview of Search in the Microsoft Platform and introduction to Search Server 2008 by Bart Vandenheede, Dolmen
In the first part of this session we will focus on the search capabilities in Microsoft Office SharePoint Server 2007. What’s in there out of the box and how can you extend the search functionality. The second part will focus on the soon to be released Search Server 2008.

There will also be a presentation about "Infonic SharePoint Geo-Replicator (formerly known as iOra) " about Server to Server and Offline Replication of Microsoft SharePoint 2003 & MOSS 2007

More information and registration on

See you there !

Wednesday, 6 February 2008

MS Search Server 2008 - When will it be available?

  • At this moments you can download Release Candidate 1 on the Microsoft site (here)
  • Q1 2008 : MS Search Server 2008 RTM will be released
  • Q1 2008 : Af ther the RTM version is release, MS will bring an update patch for Moss 2007
  • somewhere in 2008 : the update patch for Moss will be included in Moss 2007 SP 2

MS Search Server 2008 Part 4 - MS Search Server 2008 compared to MS Offiche SharePoint Server 2007

This matrix gives a good overview of the differences between Moss 2007 and MSS 2008:

In summary this matrix says:

  • The search and crawl functions are almost the same
  • MSS 2008 Express cannot be used for High availability solutions and load balancing
  • MSS 2008 has NO people search, users profiles or My Sites
  • MSS 2008 has no Business Data Catalog Search
  • MSS 2008 does not have templates for a colaboration portal, records center, document center, ... and has no advanced publishing features.

So when to choose for Moss 2007 and when for MSS 2008 ?

If you do not need the more advance features of Moss 2007 like user profiles, mysites, people search, BDC, Froms Services, Excel Services, ... and you just need document management with good collaboration and good search functionality then MS Search Server 2008 is the right choice for you!

Saturday, 2 February 2008

Programmaticaly checkin all documents in a document library

Today i wrote some small peace of code but it saved me a lot of (click) work. I uploaded 200 documents to a document library but all documents were checked out. I could do this boring job manualy but as a Sharepoint developer i wrote a quick console application to do the job.

This is the code (you can copy past it to you console application):

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SharePoint;

namespace CheckinDocuments
class Program
static void Main(string[] args)
Console.WriteLine("Please fill in the web url : ");
string webUrl = Console.ReadLine();

Console.WriteLine("Please fill in the name of the document library : ");
string documentLibraryName = Console.ReadLine();

if (webUrl != "")
using (SPSite site = new SPSite(webUrl))

SPWeb web = site.OpenWeb();
SPFile file = null;

//select the correct document library
foreach (SPList list in web.Lists)
if (list.Title.ToLower() == documentLibraryName.ToLower())
//loop all files and checkin if needed
foreach(SPListItem item in list.Items)

file = item.File;

if (file != null)
if (file.CheckOutStatus != SPFile.SPCheckOutStatus.None)
file.CheckIn("some comment");
Console.WriteLine("File checked-in = " + file.Name);
catch (Exception ex)
Console.WriteLine("Could not check-in file = " + file.Name + " - ERROR = " + ex.ToString());
Console.WriteLine("All documents are checked in, press enter to finish this program.");

Saturday, 26 January 2008

MS Search Server 2008 Part 3 - Product Improvements

What are the product improvements?

Easy installation, you can install the search server in +/- 35 minutes depending on the type of installation. The installer installs automaticaly Windows Server 2003 SP1, .NET Framework 3.0 and configures your IIS to allow the ASP.NET Role as you can see in the screenshot below.

Better User Interface for management, SharePoint 2003 had, in my opinion, a bad interface for configuring search, the Moss 2007 is much better but the interface for the MS Search Server 2008 is even better! (see screenshot below)

The product has also some performance and stability enchancements for the search functionality.

The number of documents is UNLIMMITED! It now only depends on the performance of your hardware and server setup.

In my next post i will discuss when to use Moss 2007 and when to use MSS 2008 !

MS Search Server 2008 Part 2 - Versions

There will be 2 versions of MS Search Server 2008 :

MS Search Server 2008 Express (MSSX)

  • This is the FREE version
  • Supports only standalone installations (SQL Server (express) and SharePoint on 1 Server). This version is NOT scalable or ment for high availability.

MS Search Server 2008 (MSS)

  • This version is scalable over multiple servers like the Moss 2007 version
  • This version is not free but the good news is that MS has announced to go for a License per server instead of per user licenses.

These are the only differences between the two versions, isn't that easy?

My next post will discuss the improvements of the product !

MS Search Server 2008 Part 1 - What is MSS 2008?

In the last few weeks I did some research on the new MS Search Server 2008 product. This will result in a series of blogposts on this subject. Ok, let's start !

MS Search Server 2008 is a new product of Microsoft and is actualy an "Updated and Rebranded version of SharePoint Server 2007 for Search". It is an advanced search for Windows SharePoint Services 3.0 and if i mean advanced, i mean as advanced as the Moss Search !! So this is real interesting stuff to look at!

One new cool thing that will be introduced with MS Search Server 2008 is the FEDERATED SEARCH functionality. This will enable you to display search results from other search engines like Google, Yahoo, MSDN, Wikipedia, ... You also can connect to Flickr, You Tube, ... or you can build your own search applications. In one of my next posts i will discuss the Federated Search functionality in more detail !

These are the WSS and Moss versions today:

  • Windows SharePoint Services 3.0 (WSS)
  • MS Office SharePoint Server 2007 Standard Edition
  • MS Office SharePoint Server 2007 Enterprise Edition
  • WSS v3.0 + Infopath Forms Server
  • WSS v3.0 + SharePoint Server 2007 for Search Standard (500.000 documents limit)
  • WSS v3.0 + SharePoint Server 2007 for Search Enterprise

these last two version will be updated and rebranded to MS Search Server 2008.

So in summary : MS Search Server 2008 =
WSS v3.0 + Advanced Moss Search !

When will the product be available?

At this moment there is Release Candidate 1, in the comming month(s) the final version will come available. Ather the RTM version of MSS 2008 MS will release a patch for Moss 2007 that will contain some search improvements and the Federated Search and believe me, many people will like this new feature !!

Some extra resources:
Introducing Microsoft Search 2008
Microsoft Search Server 2008 features
Technical Resources for Microsoft Search Server 2008

There is also a VPC available with MS Search Server 2008 RC1, you can download it here

My next post will discuss the 2 versions of MS Search Server 2008 !

Monday, 14 January 2008

How to add views to a custom document library, the easy way

If you create your own custom document library based on the document library feature you get the default views but what if you need extra views? You can take a deep dive into the XML and CAML to create your own view but for complex views this is a time consuming job and is it easy to make mistakes.

I found myself a very easy way to add views to a custom document library:

Step 1
Create a default document library

Step 2
If you have your own content types, link them to your document library

Step 3
Create the views you need (with filtering, grouping, sorting, ...)

Step 4
Reverse engineer your document library with the SharePoint solution generator

The SharePoint Solution Generator comes with "Windows SharePoint Services 3.0 Tools: Visual Studio 2005 Extensions", you can download it here

To reverse engineer your document library these are the steps:

  • start the SharePoint Solution Generator
  • choose for'list definition'
  • fill in the url of the site where your document library is located
  • select the document libraries you want to reverse engineer
  • choose a name for the c# project
  • Click 'Finish'

this is the result if you go to the solution folder:

Step 5
Copy the aspx files of the views to your custom document library folder, in this example: "Custom View 1.aspx" and Custom View 2.aspx"

Step 6
Edit the ASPX files of the views and remove the first comment line of the file. This is everything before "<%@Page ..." Otherwise you will get an error if you use your views. (I think this is a bug in the Solution Generator).

Step 7
The last step is to modify the schema.xml of your custom document library. You can copy past the lines from the reverse engineered document library schema.xml.

Go to the schema.xml of your reverse engineered document library and collaps the tags like the screenshot below. You now have a good overview of the views in you schema.xml. Do the same with the schema.xml of your custom document library. Now you only need to copy paste the two code blocks selected in the screenshot below to your custom document library.

Step 8
Deploy your solution and test your views!

Maybe a last tip : keep the default document library you created with the views in step 1 for future changes. (you can always try to reverse engineer an instance of your custom document library but for me the SharePoint solution explorer crashed on that ...)