Archives

Archives / 2010 / August
  • "Object reference not set to an instance of an object" when using SharePoint's ClientContext.Current in Silverlight

    SharePoint 2010 and Silverlight is a fantastic combination, especially when you use the Client Object Model for Silverlight to access SharePoint data. But maybe you’ve encountered the following situation: your Silverlight application works great when it’s hosted in the out-of-the-box Silverlight Web Part, but when you build your own custom Web Part to show the Silverlight Application it just doesn’t work anymore: the browser tells you there is an Error on page. The details of the error are: Unhandled Error in Silverlight Application Object reference not set to an instance of an object.

  • Upgrading Features in SharePoint 2010

    If you have developed Features for SharePoint 2007, you’re probably aware of a very serious limitation of Feature Development: upgradability. Deploying version 1 of your customization is no problem, but If you want to deploy a bug fix or additional functionality in version 2, you’re basically on your own. The good news is that in SharePoint 2010, this problem is solved: as a developer you can now build features that are upgradable. The basic concept goes as follows, you built your feature as usual, and optionally you’ve got the opportunity to specify what should happen when the feature gets upgraded from a previous version.

  • Easily Adding SafeControls in SharePoint 2010 with Visual Studio 2010

    Many SharePoint developers know that deploying your SharePoint customization to a SharePoint server often requires you to tinker the web.config of the sites where you’d like to see the customization in action. You can do these web.config modifications manually (not advisable), or automate them with the help of the SPWebConfigModification class from the Object Model. But quite often it’s not even necessary to use that class; when you deploy your customizations with the help of a Solution (.WSP file), like you should, the Solution deployment mechanism can modify the Web.Config to apply the most commonly used changes. This is defined in the Solution Manifest of the Solution file. The following Solution Manifest will add for example a SafeControl element for the current Assembly, which is required to display controls like Web Parts, User Controls etc. in the SharePoint sites.