Installing Office Web Apps on Windows 7

If you haven’t heard of Office Web Apps before it’s basically Word, Excel, PowerPoint and OneNote running inside a browser. It lets you edit documents right within the browser.

A bit of history
You can be forgiven to think that this is all new. The truth is that a skunkworks team within Microsoft built a version of this (code-name NetDocs) way back in 2000 (even before .NET was launched). It is believed that Steven Sinofsky (now head of Windows 7, previously head of Microsoft Office) managed to get this project killed off. Many years down the line Google snagged a lot of the guys from that original team (including the guy who Ballmer threw a chair at).

Back to the Article
Right. Back to our installation. The key document that you need to follow is this Deploy Office Web Apps guide on TechNet.

- The SharePoint 2010 beta needs to be installed
- The documents must be created with the new Office 2010 beta application in order to be editable (you can view all documents but to edit them in the browser you need to at least open and save the .docx using the latest beta of Word/Excel)

1. Download Office Web Apps from the download centre (here is the direct link). If you couldn’t figure it out the English version is the one named WcServer_en-us.exe

2. Extract the installation and edit the config.xml in order to allow installing on Windows 7. To do this run the following command from the command prompt.

WcServer_en-us.exe /exctact:C:\WCServer

If you have installed SharePoint 2010 on your Windows 7 you will be familiar with what this does.

Now you need to edit the config.xml in extract location and add the following line to \Files\Setup\config.xml just like you did for the SharePoint 2010 install.

<Setting Id="AllowWindowsClientInstall" Value="True"/>

That is it. Run setup.exe and follow the rest of the guide in the Deploy Office Web Apps article and you will be able to edit Office documents from within the browser in no time.

NB: I did not have to run any of the PowerShell scripts as the features were all activated. I simply created a new Web Application and uploaded some documents and was able to edit in the browser.



Installing SharePoint Server 2010 on Windows 7

Here’s a quick summary of how I installed the public beta of SharePoint Server 2010.

Minimum Requirements:
- Windows 7 64 bit: What this means is that your workstation needs to be 64 bit and you need to have the 64 bit version of Windows 7 installed.

The key document that you need to follow for installing on Windows 7 is this article: Setting Up the Development Environment for SharePoint Server

Key Notes:
- This was installed on Windows 7 Build 7100
- I had UAC turned off
- I already had Visual Studio 2010 Beta before installing SharePoint
- You need to manually download and install the pre-requisites for SharePoint 2010
- You need to extract the setup (using /extract), change an xml file before being able to run setup on Windows 7.

Minor Deviation:
The only part of the guide that I was forced to skip was #5 of ‘Step 3: Install SharePoint’

The reason was that the install for the SQL Server patch kept asking for the other files in the multi-part zip. (Remember to unzip the file even though it has a .exe extension)

Excluding the download times it took about 30 minutes to install SharePoint server on my Dell XPS laptop which has 4GB of RAM.

Although there is no guide published yet I was able to install Office Web Apps on my laptop as well, that guide will follow next.

Windows 7: WiFi slow to connect or Limited Connectivity

I’ve been having this frustrating issue for the last month where the laptop would take about 10 minutes before it was able to connect to the internet. This happened even when the machine came back from sleep/suspend mode.

The Wifi connection would be detected immediate but I would not get an IP from the DHCP server. I always had to fiddle around by disconnecting and connecting a few times. I was almost pulling my hair out by the end of my debug process, I even went out and bought the best wi-fi range extender I could find - thinking the signal was just weak.

Well today I got down the source. The problem was to do with the Virtual Machine Network Services that were installed when I added Virtual PC. Once I went into the WiFi Adapter properties and removed the Virtual Machine Network Services I was able to get my PC back to instant connectivity.

CKS: World Clock and Weather WebPart with Proxy Support

I recently had to add proxy support to the Community Kit for SharePoint: World Clock and Weather WebPart.

IT Teams usually like to lock down the proxy server and are not happy when they need to allow anonymous access for outgoing requests.

Looking around none of the the free ones seem to support this. Not even the cool, free Silverlight one from Bamboo Solutions.

So I added proxy support to the CKS World Clock and Weather WebPart that was released on CodePlex (v1.0.15 to be exact). I looked at the licenses and I don’t think I’m breaking any of them by sharing the source code and the setup over at MSDN Code Gallery.

There were numerous posts on various forums wishing to enable proxy server support. So here’s hoping someone might find it useful.


Download CKS: Weather WebPart with Poxy - Setup

Google Wave Invites

UPDATE: No more invites. Sorry guys I’ve given away all my invites on a first-come first-serve basis. Cheers!

I’ve given away most of my invites over Twitter but there are a few remaining though. So if you’d like a wave invite drop me a mail or leave a comment with your email address.

One tip I’ve found useful on my first day is to see public waves using with:public. The list is like a fire hose so I usually add some criteria e.g. ‘sharepoint with:public’ to see all public sharepoint waves.

WPF Checked ListBox

WPF currently does not have a checked list box out of the box so you’ll need to roll your own. Unfortunately most of the examples that come up on Google involve creating a usercontrol and writing some code.

Here’s one quick way that does not not involve writing any additional code.

Step 1: Start off by creating a class that will represent each checked list item in the list box. Obviously if you already have your data item all you need to ensure is that it has a boolean property to store the Checked/Unchecked flag.

public class CheckedListItem
    public int Id { get; set; }
    public string Name { get; set; }
    public bool IsChecked { get; set; }


Step 2: Create the list item that will be bound to the list box. I called my list AvailablePresentationObjects.

public List<CheckedListItem> AvailablePresentationObjects;

Step 3: The last step is to create the actual checked list box. I created a list box and used the HierarchicalDataTemplate to hold the CheckBox. The Name and the IsChecked property are then bound to the checkbox.

<ListBox ItemsSource="{Binding AvailablePresentationObjects}" >
            <CheckBox Content="{Binding Name}" IsChecked="{Binding IsChecked}"/>

And walla!


Now the IsChecked property will reflect the value in the UI and vice versa. If you need real-time notification when someone checks/unchecks then you simply need to raise the PropertyChanged event in the CheckedListItem class.

The War is Over

Sri Lanka is finally rid of the terrorists, the war is over. I hope and pray that we have seen the end of senseless bloodshed.

Let’s build a better, peaceful Sri Lanka.

Fixing the Silverlight caching issue

Fell into this trap today. I deployed an update of my silverlight project to the Sharepoint site but on some machines the browser continously kept loading the older version.

I racked my brain trying to figure out how to add ETags to a xap file and yet keep the deployment simple. The answer though is unbelievably simple in this case. Update your AssemblyVersion when compiling. That’s it. IIS takes care of sending the update through to all the browsers.

BTW the forums are a gem for figuring out answers to silverlight problems.

Changing the default schema in Oracle

The application I was working on assumed that the user would always be in the default schema. I ran into a snag when I had to connect to the staging environment where the read only user that I was provided with didn’t have all the objects in his schema.

The solution was to make a call to change the default schema using the ALTER SESSION call with this code.

        /// <summary>
        /// Sets the schema to use if one is configured.
        /// </summary>
        public static void SetSchema()
            var schema = ConfigurationManager.AppSettings["SchemaName"];
            if (string.IsNullOrEmpty(schema)) return;
            using (var connection = GetConnection())
                using (var command = new OracleCommand("alter session set current_schema=" + schema))
                    command.Connection = connection;