Sunday, July 31, 2005

Summer holiday scope complete

My three weeks of summer holiday is over. It has been nice weather most of the time, only a few rainy days. The first two weeks in our boat down the Swedish west coast (bästkusten), with lazy days in the archipelago of Bohuslän. The last week included some slavery at home at the whim of my wife, plus a few days of trekking in Rondane.

Now it's back to work implementing MSCRM and SharePoint, but it is only six weeks until we go hunting grouse (Lagopus Lagopus) in
Finnmark.

PS! Congrats to my colleague Mads Nissen with becoming a Microsoft MVP.

Tuesday, July 05, 2005

Using SharePoint lists.asmx web service

SharePoint (WSS 2.0) provides several web services that gives you access to different parts of the object model and its data, without the need to use the object model directly and without worrying where the data is stored in a farm deployment. Getting started is a bit tricky, but here is a list of articles that will get you started:

In addition, these tools are priceless for helping with CAML and for viewing the real names of columns in the SharePoint list:

The real column names are those you see in the CAML output area of the U2U tool, and you must use these column names in the XML parameters of the web service methods (e.g. 'Name' is really called 'Title'). If you do not get the name right or reference the wrong list, you will get an error like this:

Exception of type Microsoft.SharePoint.SoapServer.SoapServerException was thrown.

<detail> <errorstring xmlns="...">No such field name.
No field was found with that name. Check the name, and try again.</errorstring><errorcode xmlns="...">0x81020014</errorcode</detail>

Note how easily Microsoft has left out an important piece of information: which field name ?

An important detail when programming against the SharePoint web services is to remember to set the .Url property of your web reference to point to the correct WSS team site. The lists.asmx web service is a virtual service and is by SharePoint magic available in all WSS sites, not only in the IIS virtual directory /_vti_bin/. In addition, remember to apply correct credentials for authentication.


Set the .Url like this (avoid getting //_vti_bin/):

_svcList.Url = siteUrl + "/_vti_bin/lists.asmx";
_svcList.Credentials = System.Net.CredentialCache.DefaultCredentials;

The standard SDK documentation of the lists web service is available on MSDN, along with the rest of the WSS web services.

Saturday, July 02, 2005

Finishing touches on VSTO-O deployment

My colleague Mads Nissen has posted additional details about how to deploy a VSTO Outlook 2003 solution to client PCs. The post shows how to use a custom action to set the CAS rights for the install directory, in addition to naming three more VSTO assembly dependencies beyond VSTAddin.DLL.

These details completes my previous posting on VSTO-O deployment.