Wednesday, December 16, 2009

Last chance to register for BIWUG on SharePoint 2010

Today is the last chance to register for the BIWUG session about SharePoint 2010 – with 90 people registered there are only 10 seats available….

PS I will do the Introduction to SharePoint 2010 …

Solving ThreadOptions error in the SharePoint 2010 Management Shell

I noticed that when I tried to open the SharePoint 2010 Management Shell on my machine I got an error stating:

Exception setting "ThreadOptions": "This property cannot be changed after the Runspace has been opened." At C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\POWERSHELL\Registration\SharePoint.ps1:2 char:48
+ if ($ver.Version.Major -gt 1)  {$Host.Runspace. <<<< ThreadOptions = "ReuseThread"}    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException    + FullyQualifiedErrorId : PropertyAssignmentException

Thanks to Bill Baer for providing me with a solution in the SharePoint 2010 forums –installing Update KB968930 which contains the Windows Management Framework Core package fixed the error.

Monday, December 14, 2009

SharePoint 2010 – Client Object Model

The SharePoint 2010 Client Object Model feature is definitely in my top 10 list of SharePoint developer enhancements. It basically provides an abstraction layer so that client apps can interact with SharePoint – there are basically 3 flavors of Client Object Models:

  1. For .Net managed clients – uses the Microsoft.SharePoint.Client.dll in the “14\ISAPI” folder
  2. For Silverlight clients – uses the Microsoft.SharePoint.Client.Silverlight.dll from the “14\LAYOUTS\ClientBin” folder.
  3. For Javascript client code – using the SP.js file from the “14\LAYOUTS” folder.

These 3 client models all talk with SharePoint through the client.svc WCF service and all provide complete access to SharePoint artifacts such as site collections, sites, lists, items, files, folders, webparts, security, content types, etc …

If you need to retrieve data you will typically have 3 steps you need to perform:

  1. Create a connection using the ClientContext object
  2. Create a select statement and provide it to the ClientContext.Load method – you might want to take a look at how to create LINQ queries with Lambda expressions since you will need this in more advanced scenarios e.g. ctx.Load(w.Lists, lists => lists.Include(prop => prop.Title, prop => prop.Id, prop => prop.Hidden));
  3. Execute the query using ClientContext.ExecuteQuery

There is a great series of blog postings from Steve Peschka about practical use of the Client OM:

Saturday, December 12, 2009

SharePoint 2010 development – don’t forget to change the target platform

This is something which will probably bite you in the **s, when you start developing against SharePoint 2010. Don't forget to change the “Platform target” to x64 or AnyCPU
SharePoint 2010 only support 64-bit OS so your apps should do the same. So if you don't change it you will see some strange errors – even something as simple as creating a new SPSite object will throw an error stating:

"The Web application at http://intranet.contoso.com could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application."

So the error message is not very helpfull in this case ...

Friday, December 11, 2009

Solving UI problems with Visual Studio 2010 Beta2 in VMWare

I’m using VS2010 Beta2 on Windows Server 2008 R2 within VMWare Workstation and noticed that some parts of Visual Studio were not rendering or rendered in the wrong location – see for example the “New project dialog” which seemed to be missing some stuff.

This KB provided the solution for these issues – Disable SVGA drivers installed with VMWare Tools on Windows 7 and Windows 2008 R2

Installing SharePoint Server 2010 Dev Box

I finished installing my new SharePoint Server 2010 Dev box a couple of weeks ago … and forgot to publish this post. So here it goes. Installing a SharePoint Server 2010 is not that difficult since there is a lot of guidance out there. It’s really amazing how detailed the documentation is – especially since we are only at Beta 2. So what documentation did I use:

So here’s my software configuration:

All the above prerequisites are the same for SharePoint Server 2010 and SharePoint Foundation 2010 (except for the ADOMD.NET which is used for Excel Services and PerformancePoint Services – thanks Spence for the clarification). So if you plan to create both – this is the moment to create a snapshot. Next just follow the steps as outlined in Deploy a single server with SQL Server (SharePoint 2010)

On to the installation of language packs – I definitely want to check out the new MUI experience. For documentation take a look at Deploy language packs (SharePoint Server 2010) – same applies as for SharePoint Server 2007 - you must first install the SharePoint Foundation 2010 language packs before you install the SharePoint Server 2010 language packs. However I did not see the step with “On the Modify Server Farm Settings page, click Do not disconnect from this server farm, and then click Next.”

Afterwards I installed Visual Studio 2010 beta 2 as well as the Visual Studio 2010 SDK – this is something which you should probably install before installing SharePoint because the first time everything froze during install and I had to restart.

PS I’m using a Dell Precision M4400 with 8 GB RAM and SSD hard disk to run this stuff … works like a charm.

Thursday, December 10, 2009

Activating the SharePoint 2010 Developer Dashboard

The Developer Dashboard is a great feature for developers in SharePoint 2010 which enables us to troubleshoot and debug SharePoint pages – take a look at Using the Developer Dashboard in SharePoint 2010 for some great info.

So you can activate the Developer Dashboard in 3 ways:

  • Using stsadm: stsadm -o setproperty -pn developer-dashboard -pv On or stsadm –o setproperty –pn developerdashboard -pv  OnDemand. You should probably use the OnDemand mode which will add a VERY LITTLE icon in the top right corner of your pages where you can switch the Developer Dashboard on and off



  • Using Powershell
  • $snapin = Get-PSSnapin | Where-Object {$_.Name -eq 'Microsoft.SharePoint.Powershell'}
    if ($snapin -eq $null)
    {
        Write-Host "Loading Microsoft SharePoint Powershell Snapin"
        Add-PSSnapin "Microsoft.SharePoint.Powershell"
    }
    $dash = [Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings;
    $dash.DisplayLevel = 'OnDemand';
    $dash.TraceEnabled = $true;
    $dash.Update()

  • Using the SharePoint Object Model

SPWebService.ContentService.DeveloperDashboardSettings.DisplayLevel = SPDeveloperDashboardLevel.Off;
       SPWebService.ContentService.DeveloperDashboardSettings.Update();

Tuesday, December 08, 2009

Office 2003 Service Pack3 fixes problem with SharePoint content types in combination with a central document library of templates

It is considered best practice to create a central document library with all of the document templates you are using in your different SharePoint content types in SharePoint Server 2007. This way you can easily update your document template without the need to redeploy or change your SharePoint content type. Unfortunately this caused problems with Office which did not seem to be able to find the centrally located template. Fortunately installing Office 2003 Service Pack 3 fixed the problem.

Sunday, December 06, 2009

Solution for converting virtual image files between Hyper-V and VMWare

I just converted a Hyper-V image back to a VMDK to use it in VMWare Workstation using StarWind V2V Convertor. Works like a charm and it is free …

Technorati Tags: ,,,

SharePoint 2010 Partner Ignite training for developers (Belgium)

I will be teaching the SharePoint 2010 Partner Ignite training for Developers from December 14th to December 16th. Topics I will be covering:

• SharePoint 2010 Developer Roadmap
• SharePoint Development with Visual Studio 10
• SharePoint UI Advancements
• Designing Lists and Schemas
• LINQ to SharePoint
• Client Object Model
• SharePoint 2010 Workflow
• The SharePoint 2010 Services Architecture
• External Data in SharePoint (BCS)
• Enterprise Content Management (ECM)
• Extending Search
• BI Solutions

This is a Classroom Training session for Microsoft Partners. You can subscribe for this event if you are as an individual associated to a Company registered in the Microsoft Partner Program. Go to the Phttps://training.partner.microsoft.com/learning/app/management/LMS_ActDetails.aspx?UserMode=0&ActivityId=559841artner Learning Center to register

Wednesday, December 02, 2009

BIWUG on SharePoint 2010

BIWUG is back with our first session about SharePoint 2010. Our next session is the 17th of december in the new Ordina offices in Mechelen. We have a great line up amongst which 3 Belgian SharePoint MVPs presenting. Here’s the agenda:

  • 18:00 - 18:30: Welcome
  • 18:30 - 19:00: Introduction to SharePoint Server 2010 (Karine Bosch – SharePoint MVP)
  • 19:00 - 19:30: LINQ to SharePoint (Stephane Eyskens – SharePoint MVP)
  • 19:30 - 20:00: Client Object Model (Jan Tielens – SharePoint MVP)
  • 20:00 - 20:15: Break
  • 20:15 - 20:45: Business Connectivity Services (Frank Cleynen
  • 20:45 - 21:15: Workflow (Peter Plessers)

Please register on the BIWUG site.

Wednesday, November 25, 2009

Installation order for SharePoint Service Packs and Language packs

To get up to speed with the latest version of SharePoint Server 2007 (English version) including the Dutch language pack you should follow this installation order:

  1. Start with MOSS 2007 including SP1
  2. Install Service Pack 2 for WSS 3.0(English)
  3. Install Service Pack 2 for MOSS 2007(English)
  4. Install Language Pack Dutch for WSS 3.0
  5. Install Language Pack Dutch for MOSS 2007
  6. Install Language Pack Service Pack 2 for WSS
  7. Install Language Pack Service Pack 2 for MOSS 2007

Afterwards you need to start the SharePoint Configuration Wizard. It will probably ask you to run the Wizard a couple of times but you can cancel this and run the wizard after installing all the binaries.

PS I recommend going 64-bit for fresh installs of SharePoint Server 2007 given the fact that SharePoint Server 2010 will be  x64 only …

Wednesday, November 18, 2009

Office 2010 beta publicly available

Yep, Office 2010, SharePoint Server 2010, Project 2010, Visio 2010, Office Web Apps for businesses and Office Mobile 2010 – are all available for download from this start location - microsoft.com/2010 – for direct downloads:

MSDN subscribers already got their hands on the downloads a couple of days ago.

Troubleshooting .NET Framework 3.5 installation failure

When trying to install Visual Studio 2008 on a development SharePoint box yesterday, I got an error stating that the .NET 3.5 framework could not be installed - "Microsoft .NET Framework 3.0a: [2] Error: Installation failed for component Microsoft .NET Framework 3.0a. MSI returned error code 1603". But apparently this seems to be a very general error message - luckily I found out this post from Aaron Stebner - How to locate the cause of error 1603 in a verbose MSI log file - which showed me that there was an error when trying to install .Net 3.0 SP1 - apparently .NET 3.5 will install this first.

Next, I needed to check if there were some problems with .NET 3.0 - again Aaron Stebner to the rescue who has built a .NET framework Setup Verification Tool. Unfortunately this did not provide a lot of extra information - everything seemed OK.

Next my quest lead me to this post - Steps I use to diagnose .NET Framework 3.0 installation failures related to the ServiceModelReg.exe custom action and indeed in the application event logs there was an error regarding WCF. The suggested workaround about disabling the IISAdmin service(uninstalling IIS was not an option - since this is a complete sharepoint dev box and I did not want to rebuild it) did not work.

But the last tip did work - installing .NET 3.5 SP1 instead of .NET 3.5. : "The .NET Framework 3.5 SP1 installs the .NET Framework 3.0 SP2 as a prerequisite behind the scenes. The .NET Framework 3.0 SP2 setup is configured to allow installation to complete even if the ServiceModelReg custom action fails. That means that you won't see the errors described in this blog post if you install the .NET Framework 3.5 SP1 on your system."

 

Monday, November 16, 2009

Solving the “Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemTypeDeniedOrNotExitsException” error

A while ago – I got this interesting error when trying to add workitems in Visual Studio 2008 - “Could not load type Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemTypeDeniedOrNotExist"Exception from assembly Microsoft.TeamFoundation.WorkItemTracking.Client …”

Apparently I broke my Visual Studio 2008 by installing Team Explorer and Visual Studio 2008 SP1 in the wrong order – see Visual Studio 2008 with TFS Explorer broken with SP1 – reinstalling SP1 did the trick.

InfoPath Forms and attachments

In InfoPath, you can use a control called “File attachments” – this might be interesting to use when you want to allow a user to add files to a filled in InfoPath form. But beware when you store these file within an InfoPath form they will be stored as Base64 encoded strings within the  InfoPath form. This causes the included files not to be crawled by standard SharePoint search.

Here’s some sample code to extract these attachments and make them crawleable – InfoPath 2007 – Extracting those pesky binary attachments

Wednesday, November 11, 2009

Enterprise Content Types in SharePoint 2010

SharePoint Server 2010 supports the notion of Enterprise Content Types and Content Type syndication.

This concept allows for consistent content type schema’s across SharePoint over multiple site collections. Enterprise Content Types are basically content types which are published from a central Site Content Type gallery -called the Content Type Hub - to content type galleries on other site collections (even on other web applications or across farms).

This is implemented using a Managed Metadata Service Application. If you are new to the concept of Service Applications in SharePoint 2010 - take a look at these articles - SharePoint 2010: Service Applications Part One: Model Overview and The New Service Application Architecture in SharePoint 2010.

In the configuration options for the Managed Metadata Service you can specify a certain site collection to act as a central repository of content types. This central repository is called the Content Type hub. Other site collection can then consume the content types from this content type hub.  There is a maximum of 1 hub per Managed Metadata Application Service but it is possible to create multiple Managed Metadata Applications each with a corresponding site collection hub.

For content types which you define on the site collection content type hub - you get an extra configuration option - Manage publishing for this content type.



Here you can publish this content type to other site collections. You can also decide to unpublish a content type or republish it if you have made changes to the content type.


In the background this is actually accomplished using the Content Type Subscriber SharePoint Timer Job.

If you go to Site Settings on a top level site of a site collection level which does not act as a content type hub - you will notice an entry called Content Type Publishing where you get an overview of Enterprise Content Types you can consume as well as the Managed Metadata Service Application from which you consume them. The consumed content types will be marked as read-only. You will see in the screenshot that it is possible to define multiple managed metadata service applications and thus also multiple content type hubs.



Make sure that you design this carefully since it is not possible to change the content type hub location afterwards on the Managed Metadata Service application


Document Management features in SharePoint 2010 – the series

I will be publishing a number of postings about Document Management improvements in SharePoint 2010 in the coming weeks – here’s an outline – to get your appetite going:

  • Enterprise Content Types – central management of content types of  content types across multiple site collections.
  • Using Document Sets for multi-document work products
  • Enhanced metadata support with managed keywords and taxonomies
  • Creating unique DocumentIds using the DocID service

Tuesday, November 10, 2009

SharePoint List Features Framework

The SharePoint List Features Framework is an open source project driven by RealDolmen which will allow you to create features at SharePoint list level. Those familiar to SharePoint probably know that the SharePoint features framework provides a pluggable mechanism for adding or modifying functionality at site level, site collection level, web application or farm level.  The SharePoint List Features Framework extends this functionality by providing a mechanism to add features for one specific document library or list within a SharePoint site. For more information check out the new Codeplex site - http://listfeatures.codeplex.com/ .

The current build is targeted at SharePoint 2007 but we will be providing an update shortly after the release of the 2010 beta release.

Again congrats to Tom for building this great extension …

BIWUG 19th of november cancelled

Due to circumstances the BIWUG session of the 19th of november is cancelled – the next BIWUG session will be on the 17th of december.