Running the Messenger Samples


I downloaded the sample app for the Windows Live Messenger bits in preparation for our talk at Remix next week.  If you haven’t played with it, the WebToolkit Sample site is a great starting place!  There’s a couple of things you have to do to get them running so I thought it’d be a good idea to write these down for others.

Firstly, you’ll need an application id, so make sure you go to the Azure Services Developer Portal: and create a new project with a Live Services: Existing APIs type. Make sure you remember the domain name and URL you chose e.g. I picked and return URL of and also note down your app_id and secret key as you’ll need them to run the samples.

Make sure you add an entry in your hosts file for the domain you chose so you can run the application locally.  To do this open notepad as administrator, and open the hosts file located at C:\Windows\System32\drivers\etc and create an entry like:

Next, I went to IIS and created a virtual directory called Messenger and pointed it to the SampleSite. To run the application I browsed to

Make sure you setup your site in the web.config to use your app_id, secret key and correct urls.  The one that caught me out was the app_provisioned_usertoken.  I was getting an exception in the User.cs class for consent.IsValid() until I set the value to empty string e.g.

<add key="app_provisioned_usertoken" value=""></add>

Make sure you set the app_logo to point to the pulse logo so your login screen has the correct image e.g.

<add key="app_logo"