Wednesday, April 02, 2008

The UK Microsoft User Groups have organised another huge gathering at Microsoft Reading next week.

This time it's split over 2 days April 8th and 9th and features a lot of great sessions. User groups that I'm active in such as the UK SharePoint user group, PowerShell user group and the Vista squad will be there along with the user groups for Exchange, SQL Server and others.

It's not often you get a host of experts on these subjects in one location so check out the agenda and see if any sessions take your fancy.

I'm doing a session on day 2 crossing over two groups SharePoint and PowerShell on moving data in SharePoint using the Content Deployment API (aka Prime API) and PowerShell. I'll go through some of the functions and cmdlets I've written to make moving data easier, samples include moving list items, lists, webs and site collections within and between farms.

Wednesday, April 02, 2008 1:28:02 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
 Friday, March 28, 2008

Here are my slides from the presentation I did yesterday for the UK SharePoint  User Group.

Friday, March 28, 2008 12:39:45 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
 Thursday, March 27, 2008

I'm doing a presentation tonight for SUGUK on Silverlight in sharePoint and wanted to demo some of the Silverlight Blueprints for SharePoint.

Naturally I hit a few issues along the way so I thought I'd pass a few tips on.

A major requirement is to have .Net 3.5 and AJAX running on your SharePoint site. If you configure AJAX by hand as I did check this MSDN article for configuring AJAX but use 3.5.0.0 as the version number.

I configured AJAX by hand but there is also a CodePlex feature that can install AJAX on all your WFE.

It will also help to have Visual Studio 2008 and the Silverlight SDk installed on your dev box.

The first issue is that none of the XAP's as shipped will work on my machine. You'll get an error like this

 

 

checking the XAP files shows the shipped one has this as the first line of the manifest.

<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" EntryPointAssembly="SL.XAML.Navigation" EntryPointType="SL.XAML.Navigation.App">

but if I recompile the source I get

<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" EntryPointAssembly="SL.XAML.Navigation" EntryPointType="SL.XAML.Navigation.App" RuntimeVersion="2.0.30226.2">

The missing RuntimeVersion seems the key here, looks like the U2U folks were running a slightly different build of chiron the XAP compiler and certainly the Silverlight 2 runtime on my machine wont run a XAP without it.

So the fix is to recompile the Silverlight Applications and redeploy the XAP to the ClientBin directory in your IIS website directory.

Second and more bizarre is the Navigation Sample. If you try to run it you get an error about being unable to load the Assembly.

The problem here is that the PublicKey for the SL.Controls.Navigation.Dll is wrong in the MasterPage.

 

 

The MasterPage has 4aec304184eb9a69 when the DLL has bb99f30c0098259c.

The Fix is to change the MasterPage Register TagPrefix line to bb99f30c0098259c. You can use SharePoint Designer or uninstall the feature change it and then reinstall, reactivate.

This will happen when you dev with an internal snk file which has your company private keys in it and then decide you've got to change it before you ship. I've done exactly the same thing myself, it really helps to test it on a single machine outside your company first.

And IT LIVES

 

Thursday, March 27, 2008 8:42:00 AM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [1]  | 
 Friday, March 21, 2008

Zach Rosenfield has a nice post on calling WebServices from PowerShell. The steps are pretty simple: generate a proxy cs file, compile it into a DLL and then load that DLL up into Powershell AppDomain.

Well I've been doing some work with quite a few of the WebServices and I wanted to compile all the proxys into a single DLL.

Use Zach's post to setup the PowerShell environment variables needed to call the Visual Studio SDK utilities wsdl.exe and csc.exe

Heres the script to compile all the available SharePoint Webservice's into one DLL.

It simply enumerates all the ASMX files in the ISAPI directory and passes each item in that list to WSDL.exe which generates the proxy cs files.

You need to change the URL in this script to point to a valid SharePoint site and make sure there are no other .cs files in the directory before running this script.

$asmxlist= dir "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\ISAPI" *.asmx | select name

$asmxlist | foreach-object {
write-host "Generating SharePoint Proxy Library for $($_.name)" -foregroundcolor green 

$outputfilename="FlexnetConsult.SharePoint.$($_.name).cs"
$namespace=[IO.Path]::GetFileNameWithoutExtension($_.name)

wsdl "http://portal.contoso.com/matters/sites/_vti_bin/$($_.name)" /o:$outputfilename /namespace:$namespace

}

write-host "Compiling SharePoint Proxy Library" -foregroundcolor green 
csc /t:library /out:FlexnetConsult.SharePoint.WebServices.dll *.cs 

 

So the output should be something like this

 

image

 

Now three of the WebServices generate an error SlideShow.asmx. FormserverProxy.asmx and contentareatoolboxservice.asmx but as I'm unlikely to use them I'm not going to worry about those.

So now we have a DLL called FlexnetConsult.SharePoint.WebServices.dll in our directory that we can use to call the (almost) any SharePoint Web Service.

I've attached the compiled dll and script.

In my next post I'll use the DLL to do something I've wanted to do for ages and that's list, add and delete Web Parts on a page using PowerShell.

Now your probably shouting, hey why not just call the object model and GetLimitedWebPartManager, yep but that doesn't work as without a web.config and possibly a HttpContext all you get back are Error WebParts as the WebPart safecontrollist cannot be accessed.

 

 

Friday, March 21, 2008 7:59:44 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [1]  | 
 Thursday, March 20, 2008

There is an issue outstanding in WSS that is causing a few of the people who download our free Flash Web Parts grief. 

The issue shows up when anonymous users hit a web page with our Web Parts on it and they get authentication prompts.

I've gone into detail into how we get SharePoint data into flash here. We call owssvr.dll via HTTP get, pass it some parameters and get the xml data back. Great, this has been around and working since 2001. Unfortunately in WSS 3 (and MOSS) an authentication request is sent back for anonymous users even if all the settings are configured correctly. SP1 doesn't fix this either.

The issue has been open with PSS since late last year with no progress. Another conversation this week assured me this be actioned..still waiting.

Its a dismal situation and I apologise to anybody who has wasted time on trying to get our Web Parts to work.

I'm trying not to think about the resources been expended on Office 14 when issues like this remain outstanding.

Thursday, March 20, 2008 5:32:25 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
 Tuesday, March 18, 2008

While preparing for the presentation on Silverlight and SharePoint next week I've just discovered that the current Beta 1 of SilverLight 2 is unable to call SharePoint's native webservices.

The technical reason is that the WSDL SharePoint generates includes an asd:any declaration which is translated by the proxy generator as requiring the XmlElement class but Silverlight does not support this class. So you're not able to call GetList or GetListItems in Lists.asmx for instance.

I've posted on the Silverlight forums about this but the reply I got from Yavor Georgiev (Program Manager - Connected Services) was not clear as to whether this is a planned feature for SL 2.

There are a few ways around this which I'll go into in the presentation but none are very pleasant prospects.

There's probably still time to get this feature in v2. The best thing is to let MS know this is an important issue by adding support on the thread. Also worth keeping an eye on the Silverlight Web Services blog.

Tuesday, March 18, 2008 8:29:36 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [1]  | 
 Tuesday, March 11, 2008

I'm really stoked to be presenting at the UK SharePoint user group meeting in Basingstoke on the 27 March about Silverlight and SharePoint.

This presentation will explain what Silverlight is, what the benefits are over standard web development and how Silverlight can be hosted in and integrate with SharePoint.
With few slides and plenty of demos I'll walkthrough the creation of a Silverlight 2.0 video browser application that uses data from SharePoint and then deploy it to SharePoint. I'll also show how a commercial Silverlight 2.0 product for SharePoint is put together.

The other presentations are

Architecting a Highly Available MOSS Farm - by Lewis Baldwin, ICS,  Head of Infrastructure and Support

Governance: Protecting your SharePoint Investment by Symon Garfield, ICS,  SharePoint Practice Lead

The good folks at ICS solutions are hosting us at their offices in Basingstoke (http://www.icssolutions.co.uk/pages/howtofindus.aspx).

Just post a reply with your full name on this thread http://suguk.org/forums/thread/8918.aspx (registration required)

Tuesday, March 11, 2008 1:06:22 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
 Saturday, March 08, 2008

Picture this, you're a IT bod working for Thomson Financial, you've got I don't know how many sites subscribing to your global financial news feed, you need to check that your latest update is working, so you key a test message in the system, hmm that's funny nothing coming out on the test feed reader.

Try a second one, and a third and you just keep on going...

Now you did check its the test system you were logged in to?

 

Test Please Ignore

 

Its even harder to ignore on some other sites...looks like they might have lost ignore 1 and ignore 2 though, maybe they meant these to go around the world :-)

 

ThisIsATest2 - Copy

WTF
Saturday, March 08, 2008 7:47:50 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  |