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]  | 
 Wednesday, March 05, 2008

 

The Silverlight 2 Beta 1 downloads have been released!

via Micheal Sync

  • Silverlight 2 (beta1) runtime (download)
  • Microsoft® Silverlight™ 2 Software Development Kit Beta 1 (download)
  • Source Code and Unit Tests for Silverlight 2 Beta 1 Controls (download)
  • Microsoft® Silverlight™ 2 Software Development Kit Beta 1 Documentation (download)
  • Silverlight 2 (beta1) MSDN (view online)
  • Microsoft Silverlight Tools Beta 1 for Visual Studio 2008 (download)

Additional Tools ~

  • Microsoft Expression Blend 2.5 March 2008 Preview (download)

 

Now you have a chance to run the samples that have been posted at the Silverlight 'blueprints' for SharePoint website at a couple of days ago that nobody could run without the runtime above. They say Software+Services blueprints, I say a bunch of code samples.

Wednesday, March 05, 2008 8:10:59 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
 Tuesday, February 26, 2008

Its pretty easy to add list items to SharePoint with Powershell so here's a quick sample

 

[void][System.reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") 
 
# Add an new item to the announcements list
 
$site    =     new-object Microsoft.SharePoint.SPSite("http://teams.contoso.com")                                                        
$web     =    $site.rootweb                                                                                                
 
$list    =    $web.Lists["Announcements"]                                                                              
 
$newitem=    $list.items.Add()                                                                                                  
                                                                                                  
$newitem["Title"]=    "New CFO Appointed";                                                                                          
$newitem["Body"]=    "Our new CFO is Harry Varden, money still not recovered from previous appointee, legal action is ongoing";                                                                                          
$newitem["Expires"]=     [DateTime]::Now.AddDays(5)
 
$newitem.update() 
 
$web.Dispose()
$site.Dispose()                                                                                                      

This could easily be turned into a function

Here I've referenced the field names by text but I could have used SharePoint's built-in list of field Id's using the SPBuiltInFieldId class.

In that case the fields are referenced by using the syntax [Microsoft.SharePoint.SPBuiltInFieldId]::Title

To get a list of fields in the class you can use this PowerShell command

[Microsoft.SharePoint.SPBuiltInFieldId] | get-member -static | select name | more

get-member is a handy class that reflects over a given object and returns the list of properties, fields and methods.

Tuesday, February 26, 2008 11:44:06 AM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [1]  | 

Deleting a list item with PowerShell is pretty easy also

If you know or can find out the ID of the list item use the GetItemById method of the list itself

 

[void][System.reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") 

# Delete an item from the announcements list by Item ID

$site    =     new-object Microsoft.SharePoint.SPSite("http://teams.contoso.com")                                                        
$web     =    $site.rootweb                                                                                                

$list    =    $web.Lists["Announcements"]                                                                              

$deaditem=    $list.GetItemById(2)
$deaditem.Delete()

$web.Dispose()
$site.Dispose()                                                                                                      
 
Another way to delete items is to run a CAML query and delete items from the collection
This code sample deletes all those announcements that have expired dates before yesterday
 

# Delete an item from the announcements list by using a CAML query [void][System.reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") $site = new-object Microsoft.SharePoint.SPSite("http://teams.contoso.com") $web = $site.rootweb $list = $web.Lists["Announcements"]

$DeleteBeforeDate = [Microsoft.SharePoint.Utilities.SPUtility]::CreateISO8601DateTimeFromSystemDateTime([DateTime]::Now.AddDays(-1)) $caml=' <Where> <Lt> <FieldRef Name="Expires" /> <Value Type="DateTime">{0}</Value> </Lt> </Where> ' -f $DeleteBeforeDate $query=new-object Microsoft.SharePoint.SPQuery $query.Query=$caml $col=$list.GetItems($query) # Pipe results to a loop and delete each element $col | % { $_.Delete() } $web.Dispose() $site.Dispose()

 

Be very careful with this as a badly formed CAML query will return ALL the items in a list thus deleting all items in the list, use a line like $col | select Title instead of the delete to double check the results before you run the function. Using the invaluable CAML Builder utility from U2U for these queries is a good idea, just remember to remove the <Query> tags from the result.

The third way is to use some of Powershell's powerful string matching feature. This article gives a simple overview of the like and match commands in Powershell

Using like or match we could compare any field in a list and delete on that basis.

For instance lets say we need to delete all Announcements that had CEO in the title. This sample does that

 

[void][System.reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") 

# Delete announcements that match a string pattern

$site    =     new-object Microsoft.SharePoint.SPSite("http://teams.contoso.com")                                                        
$web     =    $site.rootweb                                                                                                

$list    =    $web.Lists["Announcements"]                                                                              

$list.get_items() | where { $_.Title -like '*CEO*' } | % { $_.Delete() }
                                                                                              

$web.Dispose()
$site.Dispose()      

 

Note the get_items() syntax as PowerShell has a problem with Items as a property so we have to use the assessor directly.

Tuesday, February 26, 2008 11:43:55 AM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
 Monday, February 25, 2008

I forgot to post this before but Microsoft has created a virtual lab based on my blog postings. If you're interested in Powershell and SharePoint its definitely worth checking out

http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032346304&EventCategory=3&culture=en-US&CountryCode=US

As noted on Ben Pierce's blog Powershell is now a CER common engineering requirement for all products released in 2009 and beyond, that should mean as Office 14 is due for release in 2009 PowerShell should be a mandatory feature in SharePoint.

Thats good news and a big change as when I'd asked the question about PowerShell support in SharePoint to Mike Fitzmaurice back in February last year the answer was they had no plan to do so.

Monday, February 25, 2008 12:12:27 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  | 
 Sunday, February 24, 2008

Microsoft has recently pledged to release the documentation of a lot of its up-to-now internal server protocols.

'Microsoft is providing access through open connections to its high-volume products—Windows Vista (including the .NET Framework), Windows Server 2008, SQL Server 2008, Office 2007, Exchange Server 2007, and Office SharePoint Server 2007—so that software developers, business partners and competitors can better interact with these Microsoft products or invent new solutions for customers.'

Obviously the ones getting the most attention are the server SMB interfaces but also of interest in a real geeky way are ones for the Windows Search Service and WebDAV.

What's tweaked my curiosity is that SharePoint 2007 is mentioned on this list. What interfaces are they talking about? Client side protocols like the FrontPage RPC's?  Server side ones? Dunno but it could be interesting.

Personally given the time I spent a long time ago extracting data from a corrupt Microsoft MDB in 2k pages I'd like to see the Jet DB format released, just for old times sake.

Kudo's to Microsoft to releasing this information with a much dignity as anyone with their arm twisted up their back by the EU could.

 

UPDATE:

thanks to Sean Watson for explaining that the SharePoint related Open Protocols are three WebDAV and two FrontPage ones

MS-WDV  Web Distributed Authoring and Versioning (WebDAV) Protocol: Client Extensions

MS-WDVME  Web Distributed Authoring and Versioning (WebDAV) Protocol: Microsoft Extensions

MS-WDVRV World Wide Distributed Authoring and Versioning (WebDAV) MS-Author-Via Protocol Specification

MC-FPSEWM FrontPage Server Extensions: Website Management Specification

MS-FPSE FrontPage Server Extensions Remote Protocol Specification

for more details about the Microsoft Communications Protocol Program MCPP and the legal status of these documents see http://www.microsoft.com/about/legal/intellectualproperty/protocols/mcpp.mspx 

The gist of it seems to be that open source projects are free to use this information but commercial products would possibly be subject to licencing and patent requirements depending on what they implemented.

Sunday, February 24, 2008 8:33:48 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [2]  | 

The minute we began working with Silverlight 1.1 we knew Web Application Development would never look the same again and we've been working on a Silverlight Application for SharePoint over the last few months using Silverlight 1.1 (which is going to be supercool btw) and have been waiting longingly for the Beta 1 of Silverlight 2 to appear.

Like a hitech version of the Dance of the Seven Veils newly minted Microsoft VP Scott Guthrie has just posted the first revealing posts about the upcoming SL 2 release at http://weblogs.asp.net/scottgu/archive/2008/02/22/first-look-at-silverlight-2.aspx . (scottgu.com is where the pictures are posted to and is not accessible when writing this post)

Sporting a subset of WPF features such as controls, databinding, layout and styles but most importantly supporting .net code running client-side its ironic that while WPF itself has gone nowhere (dont believe me - check the market www.jobserve.com, skills keyword WPF, EU jobs 51, yes thats 51 jobs (perm and contract) in the whole of the European union) Silverlight is set to introduce a whole slew of developers to XAML.

Microsoft has just thrown a very big stone in the web application development pond and the ripples are going to be huge.

Sunday, February 24, 2008 7:48:10 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  |