Stefan Goßner

Senior Escalation Engineer for SharePoint Products and Technologies

May, 2010

  • Write content deployment aware Event Handlers and Feature Activation code in SP2010

    In MOSS 2007 we often had support calls where content deployment failed due to event handlers firing and updating content during import.

    Event handlers or feature activation code which modifies site content on the target system can cause all kind of issues:

    1. Can cause deadlocks with conflicting with the import operation
    2. Might create new items which will are also included in the package being imported causing import to fail later with GUID conflicts.

    To overcome this problem developers had the challenge to either detect that the event handler was fired in context of an import operation (which was not trivial) or a different version of the event handler code had to be installed on the target system to avoid performing the operations.

    With SharePoint 2010 there is now a new class available....

  • Deep Dive into the SharePoint Content Deployment and Migration API - Part 7

    This article discusses functionality changes in SharePoint 2010:

    • Export from Database Snapshots 
    • New Export Settings
    • New Import Settings
    • Functionality removed from the Export part
    • Write content deployment aware event handlers and feature activation code
  • Same Blog, new Platform

    Just a couple of minutes ago all MSDN and Technet Blogs were migrated to a new blogging platform.

    New Platform: new URL. From now on you can reach my blog using
    No worries: the old URLs bookmarked will still work as redirects have been added to ensure that you can still reach the bookmarked content.

    New Platform: new Design. Per default the same design has been assigned to all Technet blogs. As I liked the general Idea of the Techent design I only adjusted it slightly to personalize it.

    I hope you like the new look and feel.

  • Common problem with SharePoint 2010: System.Security.Cryptography.CryptographicException - Keyset does not exist

    SharePoint 2010 has a new feature which recycles the OWSTIMER.EXE process every night – similar to the application pool functionality in IIS – to avoid memory problems inside the timer service. The recycling is controlled by a new timer job which has...
  • Using CSharp (C#) code in Powershell scripts

    With Powershell we now got a new very powerful scripting language and many products like SharePoint provide their own extensions in form of CmdLets for administration purposes. Customer like scripting languages as it allows them to write custom code without a need to run a compiler or to copy new executables to their production machines which usually requires a more complex approval process than deploying a script file or even to execute the commands within a command shell. But on the other hand writing Powershell scripts requires to learn a new scripting language and to to use different tools than many of us are used to. As a developer I like the power of C# and IntelliSense in Visual Studio. In addition in the last couple of years I wrote many different tools in C# - and I don't want to reinvent the wheel by porting them to Powershell. So it would be great if the existing C# code could be reused inside Powershell without a need to implement it as Cmdlet. And indeed the Powershell Version 2 provides a way to achieve this.
  • How to add the SharePoint 2010 dlls to the references in Visual Studio

    With SharePoint 2007 the DLLs in the 12-hive\ISAPI directory (e.g. Microsoft.SharePoint.dll) showed up on the .NET tab in Visual Studio which allowed easy adding of these references to your projects. If you install SharePoint 2010 you will notice that these DLLs are no longer listed on the .NET tab which means that you have to use the Browse option and have to navigate manually to the directory holding these DLLs which can be time consuming. This article explains how to solve this problem.