<?xml version="1.0" encoding="utf-8"?>
<feed xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom">
  <title>Adventures in SPWonderland.</title>
  <link rel="alternate" type="text/html" href="http://blogs.flexnetconsult.co.uk/colinbyrne/" />
  <link rel="self" href="http://blogs.flexnetconsult.co.uk/colinbyrne/SyndicationService.asmx/GetAtom" />
  <icon>favicon.ico</icon>
  <updated>2009-06-16T15:10:27.5431971+01:00</updated>
  <author>
    <name>Colin Byrne</name>
  </author>
  <subtitle>Taking apart and putting back together</subtitle>
  <id>http://blogs.flexnetconsult.co.uk/colinbyrne/</id>
  <generator uri="http://www.dasblog.net" version="2.0.7180.0">DasBlog</generator>
  <entry>
    <title>PowerShell quickie: Extract the feature IDs used in large SharePoint projects</title>
    <link rel="alternate" type="text/html" href="http://blogs.flexnetconsult.co.uk/colinbyrne/2009/06/16/PowerShellQuickieExtractTheFeatureIDsUsedInLargeSharePointProjects.aspx" />
    <id>http://blogs.flexnetconsult.co.uk/colinbyrne/PermaLink,guid,fe815927-3c14-4837-94f7-41d6125f3345.aspx</id>
    <published>2009-06-16T15:10:27.5431971+01:00</published>
    <updated>2009-06-16T15:10:27.5431971+01:00</updated>
    <category term="PowerShell" label="PowerShell" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,PowerShell.aspx" />
    <category term="Sharepoint 2007" label="Sharepoint 2007" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,Sharepoint%2B2007.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
You know how it is, you start developing a project and then 6 months later you look
back and realise you have to document everything you've produced. 
</p>
        <p>
I've just gone through that process and need a quick list of all the features ids
scattered around various subdirectories of a large project.
</p>
        <p>
sample:
</p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">&lt;Feature
Id=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"886f12cf-97ca-4789-baf8-6f13f9f2cedf"</span> Title=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"PGPSO
Contract Management Project Upgrade"</span> Description=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Feature
that upgrades Project Sites for Contract Management."</span> Version=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"12.0.0.0"</span> Hidden=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"FALSE"</span> Scope=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Web"</span> DefaultResourceFile=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"core"</span> ReceiverAssembly=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"PGPSO_CM_Project_Upgrade,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=aa0408b86137366a"</span> ReceiverClass=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"PGPSO_CM_Project_Upgrade.PGPSO_CM_Project_Upgrade"</span> xmlns=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"http://schemas.microsoft.com/sharepoint/"</span>&gt;</span>
        </pre>
        <p>
Firing up Powershell navigating to the root of the solution folders and running
this command gets me the list 
</p>
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">gci
-recurse -filter feature.xml <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">|</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">%</span> {
$contents=get-content $_.fullname; $x=[XML]$contents; <span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"{0}
{1}"</span> -f $x.Feature.Id, $x.feature.title }</span>
        </pre>
        <p>
result:
</p>
        <p>
          <img src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/ListFeatures.png" border="0" />
        </p>
        <p>
 
</p>
        <p>
gci is an alias for get-childitem which allow you to recurse subfolders and provide
a filter parameter. Then use get-content to open the file, convert to an XML object
and then directly reference the Id and title of the feature.xml file.
</p>
        <p>
 
</p>
        <p>
 
</p>
        <img width="0" height="0" src="http://blogs.flexnetconsult.co.uk/colinbyrne/aggbug.ashx?id=fe815927-3c14-4837-94f7-41d6125f3345" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Changing ODC links in Excel Services from code</title>
    <link rel="alternate" type="text/html" href="http://blogs.flexnetconsult.co.uk/colinbyrne/2008/11/20/ChangingODCLinksInExcelServicesFromCode.aspx" />
    <id>http://blogs.flexnetconsult.co.uk/colinbyrne/PermaLink,guid,f401df03-48ec-4ff9-91e5-8bbded266ff6.aspx</id>
    <published>2008-11-20T22:07:24.705+00:00</published>
    <updated>2008-11-20T22:08:37.2867251+00:00</updated>
    <category term="Sharepoint 2007" label="Sharepoint 2007" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,Sharepoint%2B2007.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <br />
        <br />
One of my coworkers on a current project has posted a useful entry about fixing a
problem you will have when deploying Excel files into Excel Services across multiple
farms that use connections in external ODC files. The fix is to use crack open the
excel file using OpenXml and change the URL to the ODC link. Nice one Oriol. Details <a href="http://oricode.wordpress.com/2008/11/17/excel-services-deployment-changing-data-connection-libraries-url-from-code/">here</a><br /><br /><br /><br /><br /><br /><img width="0" height="0" src="http://blogs.flexnetconsult.co.uk/colinbyrne/aggbug.ashx?id=f401df03-48ec-4ff9-91e5-8bbded266ff6" /></div>
    </content>
  </entry>
  <entry>
    <title>Full Text Searching your CS and PowerShell code with SharePoint Search</title>
    <link rel="alternate" type="text/html" href="http://blogs.flexnetconsult.co.uk/colinbyrne/2008/06/23/FullTextSearchingYourCSAndPowerShellCodeWithSharePointSearch.aspx" />
    <id>http://blogs.flexnetconsult.co.uk/colinbyrne/PermaLink,guid,869a1436-3b78-404c-a538-5eb20fe971aa.aspx</id>
    <published>2008-06-23T11:56:49.426061+01:00</published>
    <updated>2008-06-23T11:58:36.77462+01:00</updated>
    <category term="search" label="search" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,search.aspx" />
    <category term="Sharepoint 2007" label="Sharepoint 2007" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,Sharepoint%2B2007.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
 
</p>
        <p>
          <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image_22.png">
            <img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="287" alt="image" src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image_thumb.png" width="644" border="0" />
          </a>
        </p>
        <p>
Recently I went through the process of indexing a subversion source code repository
with SharePoint. I thought I'd share those steps as OOTB SharePoint won't index ps1,
cs or vb files.
</p>
        <p>
Setting up search to index these files works either if the files themselves live in
a document library or are external to SharePoint. The process to index files from
other source control systems will vary depending on how you can get access to the
source files. If you need to index SourceSafe you can set up what's called a mirror
directory that automatically save the files from your repositories on disk and I suspect
you can index Team Foundation Server via its Web Access URL's although I've not tried
that.
</p>
        <p>
The subversion side of things is pretty easy, pick the repository you want and export
the latest version using the svn client i.e. svn export svn://devhosting/svn/webparts
d:\SVNExport\webparts. Script the export of each repository and then schedule it. 
</p>
        <p>
On the SharePoint side you set up a new content source to crawl the directories. 
</p>
        <p>
In this case the Indexing is on a separate machine so we enter the UNC path. Make
sure the content access account has read rights to the share. If needed you can setup
separate credentials for this source.
</p>
        <p>
In the SSP on the Search Setting page, click <strong>New Content Source</strong> under <strong>Content
source and crawl schedules</strong></p>
        <p>
          <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image12.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="484" alt="image" src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image12_thumb.png" width="644" border="0" />
          </a>
        </p>
        <p>
          <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image15.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="230" alt="image" src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image15_thumb.png" width="644" border="0" />
          </a>
        </p>
        <p>
The problem now is if you start a full crawl typically only the .txt files are indexed
as the SharePoint indexers have no idea what to do with file extensions it doesn't
recognise. 
</p>
        <p>
There are a couple of steps to getting new file extensions indexed. This assumes you
are a Search Service administrator.
</p>
        <p>
          <strong>First add the extension to File Types</strong>
        </p>
        <p>
1. On the Search Administration page, click <strong>File Types</strong> under <strong>Crawling</strong>. 
</p>
        <p>
          <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image_14.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="436" alt="image" src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image_thumb_6.png" width="356" border="0" />
          </a>
        </p>
        <p>
2. On the Manage File Types page, click <strong>New File Type</strong>. 
</p>
        <p>
          <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image_18.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="284" alt="image" src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image_thumb_8.png" width="598" border="0" />
          </a>
        </p>
        <p>
3. On the Add File Type page, type the file name extension in the <strong>File extension</strong> box
for the file type that you want to add.<br />
To search for PowerShell files, type ps1 
<br />
Do not include the period (.) character in front of the file name extension. 
</p>
        <p>
4.Click <strong>OK</strong>. 
</p>
        <p>
          <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image_16.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="248" alt="image" src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image_thumb_7.png" width="520" border="0" />
          </a>
        </p>
        <p>
5. Rinse and repeat for each file type that you want to add. 
</p>
        <p>
The second step in getting the file extensions recognised is to add it to the registry
entries the SharePoint Server Search service reads when it starts up. This key is
located at 
</p>
        <p>
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\12.0\Search\Setup\ContentIndexCommon\Filters\Extension 
</p>
        <p>
Add a new key, enter the extension including the dot i.e. .ps1.
</p>
        <p>
Save and set its default value to be {4A3DD7AB-0A6B-43B0-8A90-0D8B0CC36AAB}. This
means use the text parser Ifilter tquery.dll for this extension.
</p>
        <p>
          <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image_12.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="221" alt="image" src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image_thumb_5.png" width="644" border="0" />
          </a>
        </p>
        <p>
And a new key for each file extension you want indexed in this case cs,ps1 and aspx
but you can add vb vbs or whatever other text files you need indexed.
</p>
        <p>
Stop and start the search service with these commands
</p>
        <p>
net stop osearch
</p>
        <p>
net start osearch
</p>
        <p>
Now do a full crawl of your content type and your files should have been full text
indexed. The crawl log is useful in seeing if the filtering barfed on your files.
</p>
        <p>
 
</p>
        <p>
Now you can go to the Search Center enter your keyword and get a list of code files
back.
</p>
        <p>
          <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image_6.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="464" alt="image" src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image_thumb_2.png" width="718" border="0" />
          </a>
        </p>
        <p>
Here I've set up a custom scope, search page, and added a custom search tab so separate
the code results on its own. I won't go into it here but there is a <a href="http://www.zimmergren.net/archive/tags/Search%20Scope/default.aspx" target="_blank">good
post here</a> that shows how you do this.
</p>
        <p>
Even better with SharePoint Search if you know you want PowerShell files only you
can enter the fileextension keyword and search will filter out everything but PowerShell
files.
</p>
        <p>
          <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image_20.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="321" alt="image" src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/IndexingyourCSandPowerShellcodewithShare_117D5/image_thumb_9.png" width="799" border="0" />
          </a>
        </p>
        <p>
 
</p>
        <p>
Searching your entire code repository with subsecond query times is now pretty easy.
</p>
        <img width="0" height="0" src="http://blogs.flexnetconsult.co.uk/colinbyrne/aggbug.ashx?id=869a1436-3b78-404c-a538-5eb20fe971aa" />
      </div>
    </content>
  </entry>
  <entry>
    <title>PowerShell Quickie - What version of SharePoint 2007 am I running?</title>
    <link rel="alternate" type="text/html" href="http://blogs.flexnetconsult.co.uk/colinbyrne/2008/04/05/PowerShellQuickieWhatVersionOfSharePoint2007AmIRunning.aspx" />
    <id>http://blogs.flexnetconsult.co.uk/colinbyrne/PermaLink,guid,7f3fbe8b-9c67-4daf-87ac-7521180202b1.aspx</id>
    <published>2008-04-05T22:14:18.3193852+01:00</published>
    <updated>2008-04-05T22:14:18.3193852+01:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
PowerShell Quickie - What version of SharePoint 2007 am I running? 
</p>
        <p>
  
</p>
        <div>
          <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">(get-item <span style="color: #006080">"hklm:software\microsoft\shared
tools\web server extensions\12.0"</span>).getvalue(<span style="color: #006080">"version"</span>)
12.0.0.6219 </pre>
        </div>
        <p>
Also handy 
</p>
        <p>
What version of the Operating system am I running on? 
</p>
        <div>
          <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">(Get-WmiObject Win32_OperatingSystem).Caption 

Microsoft(R) Windows(R) Server 2003, Standard Edition 
</pre>
        </div>
        <p>
        </p>
        <div>
          <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">(Get-WmiObject Win32_OperatingSystem).Version 

5.2.3790
</pre>
        </div>
        <img width="0" height="0" src="http://blogs.flexnetconsult.co.uk/colinbyrne/aggbug.ashx?id=7f3fbe8b-9c67-4daf-87ac-7521180202b1" />
      </div>
    </content>
  </entry>
  <entry>
    <title>UK Community Day at Microsoft Reading</title>
    <link rel="alternate" type="text/html" href="http://blogs.flexnetconsult.co.uk/colinbyrne/2008/04/02/UKCommunityDayAtMicrosoftReading.aspx" />
    <id>http://blogs.flexnetconsult.co.uk/colinbyrne/PermaLink,guid,d3be1633-fe28-4b87-b5c5-37da791ae87a.aspx</id>
    <published>2008-04-02T14:28:02.5726132+01:00</published>
    <updated>2008-04-02T14:33:16.3775214+01:00</updated>
    <category term="PowerShell" label="PowerShell" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,PowerShell.aspx" />
    <category term="Sharepoint 2007" label="Sharepoint 2007" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,Sharepoint%2B2007.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
The <a href="http://www.ukusergroups.co.uk/index.html" target="_blank">UK Microsoft
User Groups</a> have organised another huge gathering at Microsoft Reading next week. 
</p>
        <p>
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 <a href="http://suguk.org" target="_blank">UK
SharePoint user group</a>, <a href="http://www.culminisconnections.com/sites/get-psuguk/default.aspx" target="_blank">PowerShell
user group</a> and the <a href="http://vistasquad.co.uk/" target="_blank">Vista squad</a> will
be there along with the user groups for Exchange, SQL Server and others.
</p>
        <p>
It's not often you get a host of experts on these subjects in one location so <a href="http://www.ukusergroups.co.uk/SessionTable.html" target="_blank">check
out the agenda</a> and see if any sessions take your fancy. 
</p>
        <p>
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.
</p>
        <img width="0" height="0" src="http://blogs.flexnetconsult.co.uk/colinbyrne/aggbug.ashx?id=d3be1633-fe28-4b87-b5c5-37da791ae87a" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Slides from SharePoint and Silverlight Presentation</title>
    <link rel="alternate" type="text/html" href="http://blogs.flexnetconsult.co.uk/colinbyrne/2008/03/28/SlidesFromSharePointAndSilverlightPresentation.aspx" />
    <id>http://blogs.flexnetconsult.co.uk/colinbyrne/PermaLink,guid,0af60986-fdb5-4833-8eb8-5f14d0c54498.aspx</id>
    <published>2008-03-28T12:39:45.3429386+00:00</published>
    <updated>2008-03-28T12:56:05.4305282+00:00</updated>
    <category term="Presentation" label="Presentation" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,Presentation.aspx" />
    <category term="Sharepoint 2007" label="Sharepoint 2007" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,Sharepoint%2B2007.aspx" />
    <category term="Silverlight" label="Silverlight" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,Silverlight.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
Here are my slides from the presentation I did yesterday for the UK SharePoint 
User Group.
</p>
        <div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:c76cc882-4f83-40e8-ad19-a97dcbbb2045" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">
          <p>
            <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/SlidesfromSharePointandSilverlightPresen_B1D6/SharePoint%20Silverlight.zip" target="_blank">SharePoint
and Silverlight.zip</a>
          </p>
        </div>
        <img width="0" height="0" src="http://blogs.flexnetconsult.co.uk/colinbyrne/aggbug.ashx?id=0af60986-fdb5-4833-8eb8-5f14d0c54498" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Fix: Getting the Silverlight Blueprints for SharePoint to work</title>
    <link rel="alternate" type="text/html" href="http://blogs.flexnetconsult.co.uk/colinbyrne/2008/03/27/FixGettingTheSilverlightBlueprintsForSharePointToWork.aspx" />
    <id>http://blogs.flexnetconsult.co.uk/colinbyrne/PermaLink,guid,f1be83c7-0b1e-4704-9df3-31a306868451.aspx</id>
    <published>2008-03-27T08:42:00.479+00:00</published>
    <updated>2008-03-27T08:57:08.237118+00:00</updated>
    <category term="AJAX" label="AJAX" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,AJAX.aspx" />
    <category term="Bugs" label="Bugs" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,Bugs.aspx" />
    <category term="Sharepoint 2007" label="Sharepoint 2007" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,Sharepoint%2B2007.aspx" />
    <category term="Silverlight" label="Silverlight" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,Silverlight.aspx" />
    <category term="WebParts" label="WebParts" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,WebParts.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
I'm doing a <a href="http://suguk.org/forums/thread/8918.aspx">presentation tonight
for SUGUK</a> on Silverlight in sharePoint and wanted to demo some of the <a href="http://www.ssblueprints.net/sharepoint/">Silverlight
Blueprints for SharePoint</a>.
</p>
        <p>
Naturally I hit a few issues along the way so I thought I'd pass a few tips on. 
</p>
        <p>
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 <a href="http://msdn2.microsoft.com/en-us/library/bb861898.aspx">MSDN
article</a> for configuring AJAX but use 3.5.0.0 as the version number. 
</p>
        <p>
I configured AJAX by hand but there is also a <a href="http://www.codeplex.com/features " temp_href="http://www.codeplex.com/features ">CodePlex
feature</a> that can install AJAX on all your WFE.
</p>
        <p>
It will also help to have Visual Studio 2008 and the Silverlight SDk installed on
your dev box.
</p>
        <p>
The first issue is that none of the XAP's as shipped will work on my machine. You'll
get an error like this
</p>
        <p>
 
</p>
        <p>
          <img src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/SL Controls Error 2.JPG" border="0" />
        </p>
        <p>
 
</p>
        <p>
checking the XAP files shows the shipped one has this as the first line of the manifest.
</p>
        <p>
&lt;Deployment xmlns="<a href="http://schemas.microsoft.com/client/2007/deployment">http://schemas.microsoft.com/client/2007/deployment</a>"
xmlns:x="<a href="http://schemas.microsoft.com/winfx/2006/xaml">http://schemas.microsoft.com/winfx/2006/xaml</a>"
EntryPointAssembly="SL.XAML.Navigation" EntryPointType="SL.XAML.Navigation.App"&gt;
</p>
        <p>
but if I recompile the source I get 
</p>
        <p>
&lt;Deployment xmlns="<a href="http://schemas.microsoft.com/client/2007/deployment">http://schemas.microsoft.com/client/2007/deployment</a>"
xmlns:x="<a href="http://schemas.microsoft.com/winfx/2006/xaml">http://schemas.microsoft.com/winfx/2006/xaml</a>"
EntryPointAssembly="SL.XAML.Navigation" EntryPointType="SL.XAML.Navigation.App" RuntimeVersion="2.0.30226.2"&gt;
</p>
        <p>
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.
</p>
        <p>
So the fix is to recompile the Silverlight Applications and redeploy the XAP to the
ClientBin directory in your IIS website directory.
</p>
        <p>
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. 
</p>
        <p>
The problem here is that the PublicKey for the SL.Controls.Navigation.Dll is wrong
in the MasterPage.
</p>
        <p>
 
</p>
        <p>
 
</p>
        <p>
          <img src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/SL Controls Error.GIF" border="0" />
        </p>
        <p>
The MasterPage has 4aec304184eb9a69 when the DLL has bb99f30c0098259c. 
</p>
        <p>
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.
</p>
        <p>
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.
</p>
        <p>
And IT LIVES
</p>
        <p>
          <img src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/SSNavDemo.gif" border="0" />
        </p>
        <p>
 
</p>
        <img width="0" height="0" src="http://blogs.flexnetconsult.co.uk/colinbyrne/aggbug.ashx?id=f1be83c7-0b1e-4704-9df3-31a306868451" />
      </div>
    </content>
  </entry>
  <entry>
    <title>PowerShell: Generating a proxy for all the SharePoint WebServices</title>
    <link rel="alternate" type="text/html" href="http://blogs.flexnetconsult.co.uk/colinbyrne/2008/03/21/PowerShellGeneratingAProxyForAllTheSharePointWebServices.aspx" />
    <id>http://blogs.flexnetconsult.co.uk/colinbyrne/PermaLink,guid,e76c4e80-587b-46ac-891e-d08d9ab785bb.aspx</id>
    <published>2008-03-21T19:59:44.5134202+00:00</published>
    <updated>2008-03-21T20:27:58.5099104+00:00</updated>
    <category term="PowerShell" label="PowerShell" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,PowerShell.aspx" />
    <category term="Sharepoint 2007" label="Sharepoint 2007" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,Sharepoint%2B2007.aspx" />
    <category term="WebParts" label="WebParts" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,WebParts.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://sharepoint.microsoft.com/blogs/zach/Lists/Posts/Post.aspx?ID=9" target="_blank">Zach
Rosenfield</a> 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. 
</p>
        <p>
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. 
</p>
        <p>
Use Zach's post to setup the PowerShell environment variables needed to call the Visual
Studio SDK utilities wsdl.exe and csc.exe
</p>
        <p>
Heres the script to compile all the available SharePoint Webservice's into one DLL.
</p>
        <p>
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.
</p>
        <p>
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.
</p>
        <div>
          <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">$asmxlist= dir <span style="color: #006080">"C:\Program
Files\Common Files\Microsoft Shared\web server extensions\12\ISAPI"</span> *.asmx
| select name $asmxlist | <span style="color: #0000ff">foreach</span>-object { write-host <span style="color: #006080">"Generating
SharePoint Proxy Library for $($_.name)"</span> -foregroundcolor green $outputfilename=<span style="color: #006080">"FlexnetConsult.SharePoint.$($_.name).cs"</span> $namespace=[IO.Path]::GetFileNameWithoutExtension($_.name)
wsdl <span style="color: #006080">"http://portal.contoso.com/matters/sites/_vti_bin/$($_.name)"</span> /o:$outputfilename
/namespace:$namespace } write-host <span style="color: #006080">"Compiling SharePoint
Proxy Library"</span> -foregroundcolor green csc /t:library /out:FlexnetConsult.SharePoint.WebServices.dll
*.cs </pre>
        </div>
        <p>
 
</p>
        <p>
So the output should be something like this
</p>
        <p>
 
</p>
        <p>
          <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/PowerShellGeneratingaproxyforalltheShare_11675/image_2.png">
            <img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="447" alt="image" src="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/PowerShellGeneratingaproxyforalltheShare_11675/image_thumb.png" width="848" border="0" />
          </a>
        </p>
        <p>
 
</p>
        <p>
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.
</p>
        <p>
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. 
</p>
        <p>
I've attached the compiled dll and script.
</p>
        <p>
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. 
</p>
        <p>
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.
</p>
        <p>
  
</p>
        <div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:bdd73ff3-7ce5-4c77-b39b-9bf22a6af7b4" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">
          <p>
            <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/PowerShellGeneratingaproxyforalltheShare_11675/GenerateSharePointProxyLibrary.ps1" target="_blank">GenerateSharePointProxyLibrary.ps1</a>
          </p>
        </div>
  
<p></p><div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:8a96d3f8-dfc2-4e58-b57b-54555752ee91" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"><p><a href="http://blogs.flexnetconsult.co.uk/colinbyrne/content/binary/WindowsLiveWriter/PowerShellGeneratingaproxyforalltheShare_11675/FlexnetConsult.SharePoint.WebServices.dll" target="_blank">FlexnetConsult.SharePoint.WebServices.dll</a></p></div><img width="0" height="0" src="http://blogs.flexnetconsult.co.uk/colinbyrne/aggbug.ashx?id=e76c4e80-587b-46ac-891e-d08d9ab785bb" /></div>
    </content>
  </entry>
  <entry>
    <title>SharePoint bug: URL Protocol prompts for anonymous users</title>
    <link rel="alternate" type="text/html" href="http://blogs.flexnetconsult.co.uk/colinbyrne/2008/03/20/SharePointBugURLProtocolPromptsForAnonymousUsers.aspx" />
    <id>http://blogs.flexnetconsult.co.uk/colinbyrne/PermaLink,guid,77cc91d1-2187-46a3-ade3-db593f1cd69f.aspx</id>
    <published>2008-03-20T17:32:25.7480414+00:00</published>
    <updated>2008-03-20T17:33:26.905857+00:00</updated>
    <category term="Bugs" label="Bugs" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,Bugs.aspx" />
    <category term="Sharepoint 2007" label="Sharepoint 2007" scheme="http://blogs.flexnetconsult.co.uk/colinbyrne/CategoryView,category,Sharepoint%2B2007.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
There is an issue outstanding in WSS that is causing a few of the people who download
our free Flash Web Parts grief.  
</p>
        <p>
The issue shows up when anonymous users hit a web page with our Web Parts on it and
they get authentication prompts. 
</p>
        <p>
I've gone into detail into how we get SharePoint data into flash <a href="http://blogs.flexnetconsult.co.uk/colinbyrne/default,month,2006-01.aspx" target="_blank">here</a>.
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.
</p>
        <p>
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.
</p>
        <p>
Its a dismal situation and I apologise to anybody who has wasted time on trying to
get our Web Parts to work. 
</p>
        <p>
I'm trying not to think about the resources been expended on Office 14 when issues
like this remain outstanding.
</p>
        <img width="0" height="0" src="http://blogs.flexnetconsult.co.uk/colinbyrne/aggbug.ashx?id=77cc91d1-2187-46a3-ade3-db593f1cd69f" />
      </div>
    </content>
  </entry>
</feed>