Silverlight – What, when, where, how, and why

This is multi part post. Odds are I will just keep adding to it…

Microsoft Silverlight is a cross-browser, cross-platform, and cross-device plug-in for delivering the next generation of .NET based media experiences and rich interactive applications for the Web. I first noticed it appear via update in Q2 2008 on machines. It has an official site where you can learn and see what it can do here:



OS/browser IE 6 SP1 IE 6 SV1 IE 7 IE 8 Firefox SeaMonkey Safari Konqueror Opera Google Chrome
Windows Vista/2008 N/A N/A 1.0, 2.0, 3.0 1.0, 2.0, 3.0 1.0, 2.0, 3.0 1.0, 2.0 1.0, 2.0 N/A Unofficially 2.0
Windows XP/2003/Home Server N/A 1.0, 2.0, 3.0 1.0, 2.0, 3.0 1.0, 2.0, 3.0 1.0, 2.0, 3.0 N/A 1.0, 2.0; via N/A Unofficially 2.0
Windows 2000 2.0 N/A N/A N/A 2.0 Unofficially N/A 2.0; via N/A Planned N/A
Windows Mobile 6 2.0 N/A N/A N/A N/A N/A N/A N/A N/A N/A
Mac OS 10.4/10.5 PowerPC N/A N/A N/A N/A 1.0 N/A 1.0 N/A Planned N/A
Mac OS 10.4/10.5 Intel N/A N/A N/A N/A 1.0, 2.0 N/A 1.0, 2.0 N/A Planned N/A



WSS3.0: HowTo use STSADM.EXE

  • STSADM is the cmd line tool for SP Central Administration
  • PSCONFIG is the cmd line tool for SP Configuration Wizard

Each STSADM command line is using a shortcut to the program (shortcut to PSCONFIG, too):

@SET STSADM="%ProgramFiles%common filesmicrosoft sharedweb server extensions12binstsadm"
@SET PSCONFIG="%ProgramFiles%common filesmicrosoft sharedweb server extensions12binpsconfig"

HowTo rename a server (in a VPC):

  • Rename the server in Windows from the “My Computer” icon – Properties – Computer Name
  • Rename the server in WSS:
@SET oldServerName=youroldsrvname
@SET newServerName=yournewsrvname
@SET usr=sp-mosssetup
@SET psw=moss!
%STSADM% -o renameserver -oldservername %oldServerName% -newservername %newServerName%
%STSADM% -o updatefarmcredentials -userlogin %newServerName%%usr% -password %psw%

Response renameserver:

The server contains the configuration database. To complete this operation, you must rerun this command on all machines that are joined to the farm. A restart may also be required.
Operation completed successfully.
You may also need to update any alternate access mappings referring to .

Response updatefarmcredentials :

To ensure that all credential caches in IIS have updated, you must run the command “IISRESET /NOFORCE” on all servers in the farm. This should be done after all credential updates have been completed.
Operation completed successfully.

MOSS: Enable Anonymous Search – The Easy 3 Step Way

1: Make a copy of “C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions12TEMPLATELAYOUTSosssearchresults.aspx”

2: Remove Inherits=”Microsoft.SharePoint.WebControls.LayoutsPageBase” from the same file.

3: Add the following script to the the same file after changing the bolded text to your custom page.

function getURLParam(strParamName){

var strReturn = “”;

var strHref = window.location.href;

if ( strHref.indexOf(“?”) > -1 ){

var strQueryString = strHref.substr(strHref.indexOf(“?”)).toLowerCase();

var aQueryString = strQueryString.split(“&”);

for ( var iParam = 0; iParam <>

if (

aQueryString[iParam].indexOf(strParamName.toLowerCase() + “=”) > -1 ){

var aParam = aQueryString[iParam].split(“=”);

strReturn = aParam[1];





return unescape(strReturn);


var urlstring = ‘/Search/Pages/results.aspx?k=’ + getURLParam(‘k’) + ‘&cs=’ + getURLParam(‘cs’) + ‘&u=’ + getURLParam(‘u’)


Nifty: Microsoft Business Data Catalog Definition Editor for Microsoft Office SharePoint Server 2007

Ah Microsoft, you giveth and you taketh.

The Microsoft Business Data Catalog Definition Editor for Microsoft Office SharePoint Server 2007 aka MSBDCDEFMOSS2007 (all me…) is a nifty yet hobbled tool fresh(ish) from Microsoft. In brief its features include:

  • Underlying XML is abstracted by the design surface and properties window
  • Drag and drop web methods, tables, or views to create line of business (LOB) connections.
  • Entities and methods are created automatically from database metadata and WSDLs.
  • Additional method instances can be added to further enhance the database or web service connection.
  • Method instances can be tested from within the tool, enabling incremental development of LOB connections

That said… Here’s the catch. (For now I hope…)
The tool is unusable with SQL Server 2005/2008 schemas… So, you cannot use it against AdventureWorks, BUT you can use it against AdventureWorksDW. If you dare to try, you will be rewarded with a “Could not process Table ‘….’. Also, make sure you have SELECT Rights on the Table/VIEW”.

Helpful links

Nifty: SharePoint Search Service Tool

I discovered a very handy project on Codeplex recently, The SharePoint Search Service Tool. To quote their own site:

“The SharePoint Search Service Tool is a rich web service client that allows a developer to explore the scopes and managed properties of a given SharePoint Search SSP, build queries in either Keyword or SQL Syntax, submit those queries and examine the raw web service results. This tool can be useful in troubleshooting and verifying the behavior and configuration of a SharePoint environment.

The SharePoint Search Service Tool is an evolution of a tool that used to be available back on GotDotNet moons ago that was called the MOSSQueryTool. Because the tool has been enhanced and should work with all SharePoint Search products, it has been renamed for its initial public release.”

Right now it is at V1.1 and is well worth a look see:

SharePoint Event ID: 5139 WAS 503 woes

I struggled GREATLY with an error recently. IIS 7 failed with a 503 on request and the event log had the following entry.

Log Name: System
Source: Microsoft-Windows-WAS
Date: xx/yy/zz
Event ID: 5139

I have not fully discerned the problem but a fix was possible.

Disable IP6 functionality

There was an entry in the hosts file that looked like “fe80::98er:3968:5b73:2978 ServerName # Added by Office SharePoint Server Search” which needed to be removed.

With IP6 disabled it will not come back. If your farm, like mine, was down you need to disconnect and reconnect all boxes AFTER disabling IP6. This was rather painful as it was late in the AM when an Index server, the culprit with IP6, was attached to the farm.

I hope it is of help to somebody.

How to enable anonymous access for your SharePoint sites

  1. From Central Administration > Application Management > Application Security > Authentication Providers, select a Web application and the zone you want to modify. This is usually default.

  2. In the middle of the page, check Enable Anonymous Access and choose Save

  3. All site collections in that Web application can now have anonymous access enabled.

  4. Go to a site collection in the Web application you just enabled anonymous access for

  5. From Site Actions > Site Settings, open Advanced Permissions

  6. From the Settings drop-down menu, select Anonymous Access

  7. For this example, enable anonymous access for Lists and Libraries and click OK

  8. Browse to any document library in this site collection

  9. From the Settings drop-down menu, select Document Library Settings

  10. In the Permissions and Management column, select Permissions for this document library

  11. From the Actions menu, select Edit Permissions to break inheritance

  12. From the newly appeared Settings drop-down menu, select Anonymous Access

  13. Check View Items and click OK.

PDF Document Type Icon in MOSS

PDF Document Type Icon in MOSS

MOSS doesn’t install an icon for PDF files by default. It simply shows a generic white paper icon.
This is my procedure for fixing this issue:

  1. Download an appropriate icon for pdf document types.
    1. This is the icon from Adobe.
    2. Save to TEMPLATEIMAGES directory. (DEFAULT: C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12templateimages)
  2. Open the file docicon.xml. (DEFAULT: C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12templatexmldocicon.xml)
  3. Add a new Mapping element to the ByExtension element.
    NOTE: Be sure to change pdficon_small.gif to whatever image you downloaded to represent pdf documents.
  4. Save the edited docicon.xml file.
  5. Restart IIS (iisreset /noforce).

You should now see the PDF icons for

How solution deployment has changed development with SharePoint technologies


Anyone who is familiar with development & deployment of custom solutions on SharePoint Portal Server 2003 or Windows SharePoint Services will probably agree when I say there are certain areas lacking in the end to end process.

For example, here is a high level generic step by step process that usually happens:

  1. Spec written (some people seem to think this step is optional)
  2. Developer develops code etc… Usually on a stand-alone, single server SharePoint environment. (I personally use a VPC for all development these days)
  3. Developer packages code into an installer if you are lucky
  4. Testing
  5. Hand off to production people who go and install it on the server(s).

This would normally be really easy right? Well, in SharePoint land there are many areas where “things” need to be done during an installation. Some of these are (but not limited to):

  • Assembly deployment. GAC or BIN
  • Web.config changes. Additions to the safe controls list, CAS security policies,
  • Resource files like images,
  • Dwp files
  • Site definitions (list definitions etc…)

Depending on how your development team packaged these would depend on how much work you had to do to deploy them.

To make matters worse, depending on your physical SharePoint farm you might need to do install steps on each server. This brought in complexity around what servers had what versions at what time etc… A nightmare if you were managing a large farm with many servers.

How we make this better in MOSS and WSSv3:

In MOSS we have a good solution to all of this called the Solution Framework. Here is a little summary about what this is:

“The Windows SharePoint Services (WSS) solution framework provides a way to bundle together all of the components for extending SharePoint in a new file called a solution file (a CAB-based format with a WSP extension). A solution is a deployable, reusable package that can contain a set of features and site definitions, templates, Web Parts, and assemblies that you can apply to a site, and individually enable or disable.” – WSS SDK

Not only this but the Solution Framework takes care of deploying the solution to ALL front end web servers in the farm without the admin having to go to each box to do this manually!

You can:

  • Deploy the Solution package to the farm
  • Retract the Solutions package
  • When a new web server is added, automatically deploy the solution to it
  • Deploy new versions of the Solution

Practical example:

In the system I talked about in “Application Development on MOSS & WSSv3” we are using a Solution package to deploy:

  • A custom Site Definition
  • 6 Feature Definitions (another new MOSS technology) that are:
    • Custom Workflows x2
    • Timer Job
    • Content Type
    • Custom List definition
    • Custom Site Columns definition
  • Web part
    • SafeControls list entry

Note: I won’t talk about Features or how to create them; Todd has a good post on that subject here:

[Updated] This means when we want to deploy this solution to a new farm we simply use the STSADM -addsolution -filename to upload the solution to the farm. Once uploaded you can simply to into the “Solution management” section under the “Operations” tab in the Central Administration Site, and deploy that solution.

Once it is uploaded we can then choose to Deploy that solution.

This gives you options on when you want the deployment to take place and to what web applications. (In the shot above I had an assembly being deployed to the GAC, hence the warning)

Although all this will be/is documented in the WSS SDK, I thought I quickly go over how to make a solution file.

Consists of:

  • A CAB file containing
    • A Manifest.xml file
    • All the files for the Features etc… that make up your solution

Below is a cut down sample XML manifest.xml file for the example I used above (highlighted text is comments):

< ?xml version="1.0" encoding="utf-8" ?>
< xmlns="" solutionid="{79d1a62e-3627-11db-963e-00e08161165f}" resetwebserver="TRUE">

< deploymenttarget="GlobalAssemblyCache" location="Foo.Sharepoint.WebpartsFoo.SharePoint.WebParts.dll">
< assembly="Foo.Sharepoint.Webparts, Version=, Culture=Neutral, PublicKeyToken=63cce650e8605f5d" namespace="Foo.Sharepoint.Webparts" typename="*">
< /SafeControls>
< /Assembly>
< deploymenttarget="GlobalAssemblyCache" location="Foo.Sharepoint.Timer/Foo.Sharepoint.Timer.dll">
< /Assemblies>


< location="Foo.Sharepoint.TimerFeature.xml">

< location="Foo.CustomTypeFeature.xml">

< location="Foo.FooLibraryFeature.xml">

< location="Foo.ColumnsFeature.xml">

< location="Foo.Workflow.ProcessFooFeature.xml">

< location="Foo.Workflow.ProvisionFooFeature.xml">

< /FeatureManifests>

< location="FOO">
< location="1033XMLWEBTEMPFoo.XML">
< /SiteDefinitionManifest>
< /SiteDefinitionManifests>
< /Solution>

Then you package this up along with all your Feature files into a CAB file with a “.wsp” extension. In short each feature goes into a sub-dir in the CAB that matches the path you have in the Manifest.xml file. You can use cabmake.exe to do this, or any other tool you like.

Then you are ready to go and deploy!

Although this is probably a little more work to begin with, your deployment team will thank you for it immensely.