Monday, August 27, 2007

IT Talks event - Installing, administering and working with SharePoint 2007

Some guys I know are doing an IT Talks event about SharePoint 2007 - for more info check out the IT Talks web site. If you have never seen SharePoint, don't miss it - it's a great intro ...

Technorati tags: , , ,

Georeplication in WSS 3.0 or Microsoft Office SharePoint Server 2007

Geographic Replication is not an out of the box feature feature in neither MOSS 2007 or WSS 3.0. It is however possible to develop your own geographic replication solution using the WSS object model.   Basically, you will need to start looking at the content migration APIs  (previously called "Prime" during the beta phase). It is doable to create a "syncing" solution of two or more servers by exporting and importing changes. Implemting conflict resolution for import or export would already provide you with some work. If you want to built a serious solution, take a look at the SPExport and SPImport objects in the SharePoint.Deployment namespace. There is a small code snippet available in the WSS SDK  about content import/export.

If you want to learn more about it - definitely take a look at Jackie Bodine's post about SharePoint Content Migration Object Model and Content Migration Packages. Joel Oleson has a pretty nice post about some Replication and High Availability (Joel Oleson) in which he also talks about third paryt products which do georeplication. Not surprisingly these products don't come cheap - so I'm still waiting for a basic solution framework or code samples on Codeplex ...


Wednesday, August 22, 2007

What about correlation tokens and SharePoint workflow?

Correlation tokens are something very important in SharePoint

A correlation token is a means of uniquely identifying each instance of a workflow, modification or task.  When SharePoint initiates a workflow, it does not spawn a unique set of objects. Instead, if one instance of the workflow is already running when the second initiates, the second will reuse objects from the first. Correlation token properties ensure that the single activity object is operating on the correct workflow instance and accessing the correct details about the workflow.

One of the things to watch out for is when to use a different correlation token - a great starter about this is the blogpost of Eilene Hao about the importance of correlationtokens.


For more information about correlation tokens take a look at :

PS Shameless plug - if you want to learn more about workflow development in SharePoint, definitely buy Real World SharePoint 2007: Indispensable experiences from 16 MOSS and WSS MVPs . Robert Bogue wrote a chapter about WSS workflow development and I did one about SharePoint Server workflow development...

Monday, August 20, 2007

Defining SharePoint v3 webparts (ASP.NET 2.0 webparts) in the Modules section of ONET.XML

As you probably know there are 2 different base classes that you can use when developing web parts for WSS 3.0 or MOSS 2007. You can either inherit from System.Web.UI.WebControls.WebParts.WebPart which are your ASP.NET 2.0 webparts or you can still use Microsoft.SharePoint.WebPartPages.WebPart (It is considered best practice to build your webparts using the ASP.NET 2.0 way - the other ones are only in there for backwards compatibility). For a thorough discussion about the different ways to build webparts check out Jan's article on MSDN Belux - Web Part Platforms and Development Techniques.


When a site in SharePoint is created it is based on site definition. I'm not going to elaborate about how you can create your custom site definition but I'm going to talk about the Modules section in ONET.XML. In this Modules section, you can specify which files need to be provisioned at site creation - take a look at Using Modules to add files to site definition on MSDN (SPS 2003 documentation - not available for SharePoint 2007 yet) . This article also describes how you use the Modules element to specify which web parts are used on the home page of the default.aspx file in every site.

   <Module Name="Default" Url="" Path="">
      <File Url="default.aspx" NavBarHome="True">
         <View List="104" BaseViewID="0" WebPartZoneID="Left"/>
         <View List="106" BaseViewID="0" WebPartZoneID="Left" WebPartOrder="2"/>
         <AllUsersWebPart WebPartZoneID="Right" WebPartOrder="1">
            <![CDATA[<WebPart xmlns=""
               <Assembly>Microsoft.SharePoint, Version=, Culture=neutral,
         <View List="103" BaseViewID="0" WebPartZoneID="Right" WebPartOrder="2"/>
         <NavBarPage Name="Home" ID="1002" Position="Start"></NavBarPage>
         <NavBarPage Name="Home" ID="0" Position="Start"></NavBarPage>

Unfortunately, the code listed above only works if you are using V2 webparts - being webparts which inherit from Microsoft.SharePoint.WebPartPages.WebPart. But what if you need to add an ASP.NET 2.0 webpart?  I first thought that I just needed tot change the xmns from to - but that did not work ( ... would probably have been to easy). So what is the correct syntax?

The correct syntax is actually the one which is used for the .webpart files - if these were generated for you (you might have just added a webpart using the approach as described by Mart - Create a SharePoint 2007 webpart step by step ) you can still get at the XML file which you will need to use.

Go to the Web Part Gallery of the site collection which contains your web parts - select Edit document properties for the webpart that you want to include in your site definition. Next click - View XML - this will show you the syntax you will need ...remember that you will need to include the <webParts> ...</webParts> start and end tags. (This is also case sensitive). Beneath is an example of one of the webparts I had created:

    <Module Name="Default" Url="" Path="">
      <File Url="default.aspx" NavBarHome="True">
        <NavBarPage Name="$Resources:core,nav_Home;" ID="1002" Position="Start" />
        <NavBarPage Name="$Resources:core,nav_Home;" ID="0" Position="Start" />
    <AllUsersWebPart WebPartZoneID="Right" WebPartOrder="1">
    <webPart xmlns="">
    <type name="DolmenWebParts.WebPropViewer, DolmenWebParts, Version=, Culture=neutral, PublicKeyToken=null" />
    <importErrorMessage>Cannot import this Web Part.</importErrorMessage>
        <property name="Title" type="string">WebPropViewer</property>

Happy SharePointing ...

Starting with game development for XBOX360

First start off with downloading Visual C# 2005 Express Edition, afterwards you will need to apply SP1 for Visual Studio Express Edition (Rather strange that you can't use Visual Studio 2005 Professional - fortunately you can just install the different versions side by side. ) Once you have installed VS2005, you will need to download XNA Game Studio Express 1.0 Refresh. Update:  I just learned that version 2.0 of XNA will be available end 2007 - that version will support all versions ov Visual Studio - For more info see Announcing XNA Game Studio


All tools are free of charge but when you want to debug and/or play games on your XBox 360 you will need a XNA creators club subscription . Steps you will need to go through to get the thing running:

Happy XNA-ing ...

Technorati tags: , , ,

Article series - A (Microsoft) code name a day

A while ago Mary Jo Foley started with the article series - A (Microsoft) code name a day - here are some of them which are a little less know (but definitely not less interesting):

  • Harmonica - Best guess on what it is: A P2P data synchronization service that could be key to Microsoft’s cloud-computing vision.
  • Greenland -  Best guess on what it is:  WS-Management Protocol 1.1
  • Jasper  or Dynamic ADO.Net - definitely take a look at this one -  download the  Jasper CTP or at least read about it on the ADO.Net blog
  • Astoria -  Best guess on what it is : A set of technologies allowing applications to expose data as a data service that can be consumed by Web clients within a corporate network and across the Internet. Astoria is one component of Microsoft’s “data-in-the-cloud” strategy. Also take a look at Introducing Project Codename Astoria

Check out the  complete overview of Microsoft Codenames on ZDNet

Tuesday, August 14, 2007

Syntax for SPLongOperation.End(string sRedirectUrl)

A while ago I wrote about Compiling SharePoint 2007 audiences using the SharePoint object model (C# code sample) which was used in a custom SharePoint application page.  Since the code in this custom application page might take a while to run I used the SPLongOperation class to show the nice SharePoint 2007 "Operation in progress" user interface while the code is running.

When your code is finished you can redirect to a specific web page by using SPLongOperation.End() method and passing in a url - the code below redirects to the previous page which called into the SharePoint application page.


Now, something which I forget was that the URL string that you pass in should not be URLEncoded so the syntax should be



Troubleshooting SharePoint crawler keeps on crawling

This is something I noticed a couple of times - your Microsoft Office SharePoint Server 2007 crawl just seems to be running forever without any reason. If you are using Microsoft SQL Server 2005 as a back end database you might want to take a look at the SQL Server Maintenance plans. To resolve the issue, take a look at the procedure detailed in KB930887 - You experience issues with portal alerts in SharePoint Portal Server 2003 or with search performance in SharePoint Server 2007 after you create SQL Server 2005 maintenance plans or just apply Service Pack 2 for SQL Server 2005.

Wednesday, August 08, 2007

Solving SharePoint site not assigned to an indexer

This is something I came accross a couple of months ago when I was trying to access SharePoint search through code  - it gave the error "Your search cannot be completed because this site is not assigned to an indexer. Contact your administrator for more information." Apparently, there was something wrong in the configuration, to solve this - do the following:

  • Go to SharePoint Central Administration > Application Management > Content Databases (Underneath SharePoint Web Application Management).
  • Select the correct SharePoint web application – click on the name of the Content databases  - this will open the  “Manage Content Database Settings” page. 
  • Make sure that the Search Server is set on the “Manage Content Database Settings” page.
Technorati tags: , , ,

Tuesday, August 07, 2007

Cool interview with William Gibson

I must confess that I'm an avid reader - but William Gibson definitely is one of my favorites - there is a very interesting interview with William Gibson at Silicon.Com. My favourite books (watch out -  these books are part of a genre called cyberpunk which you either hate or love ...)

PS The movie Johnny Mnemonic with Keanu Reeves is also based on one of his short novels - but trust me the books are a lot better then this movie ...

Technorati tags: , ,

Back from holidays

I'm back from my holidays to the Picos de Europa in Spain - if you like trekking and climbing definitely worthwhile. Since the Picos are a National Parque they even have free guided tours. If you want to do the walks on your own better get a good book or some decent cards since the walking roads aren't always clearly indicated ...


Technorati tags: , , ,