Category Archives: Microsoft

Ensuring facebook canvas applications work in IE8 / IE9 / IE10

Last week I deployed a new Facebook application into a production environment. Everything seemed to be working perfectly, but then I received a report that the application wasn’t working correctly in IE8+. I narrowed down the problem, and then realised that sessions weren’t working. It turns out IE8+ has a security policy that prevents iframes from setting cookies if the parent domain is different. Therefore because my PHP session cooking wouldn’t set, the sessions obviously didn’t work between pages.

The good news is the fix is simple. Add this header to your page:

 header('p3p: CP="NOI ADM DEV PSAi COM NAV OUR OTR STP IND DEM"');

If you want to read more about this check this page:

http://en.wikipedia.org/wiki/P3P

Bonus: if using silex add this middleware:

$app->after(function (Request $request, Response $response) {
    $response->headers->set('p3p', 'CP="NOI ADM DEV PSAi COM NAV OUR OTR STP IND DEM"');
});

Jump In Camp


(Thanks to Derick Rethans for the picture)

Note: Further blog posts about the event, and more specifically what I worked on at camp will come latest this week.

Introductions

I was lucky enough to be given the opportunity last week to attend JumpInCamp, a developers conference/workshop ran by Microsoft in the beautiful setting of Zurich. The brief was as follows

As a participant you will spend four unforgettable and instructive days in the Panorama Resort & Spa Feusisberg, Switzerland – all-inclusive, for free. A live blog – to which you will contribute – will put all your friends and colleagues in the picture while you’re at the Camp.

I was sold ;)

Upon arriving at the airport I met with a few of the fellow attendees at the camp before setting off for the hotel. After a speedy check-in, we all went for a buffet dinner giving everyone a chance to introduce themselves and sample the first of many delicious meals that were to come!

Day 1

Day 1 of camp started off too bright and early giving us our first introduction to the main topic of the week: Windows Azure. Josh Holmes gave us a great overview of the platform and the technology that powers it. Most interesting perhaps, was the system Microsoft has put in place to deploy Azure nodes around the world incredibly easily.

Next up was Faith Allington who gave us a presentation on the Web Platform Installer (Web PI) which provides an interesting interface for deploying web applications to IIS. The smart phpBB guys got a working version of their software into the web gallery during the week which can be found here: http://area51.phpbb.com/phpBB/viewtopic.php?f=3&t=32736

After lunch Maarten Balliauw gave us a great introduction to the Windows Azure Storage platform and instructions on how to use the excellent SDK he’s developed for interacting with the platform. I’ll discuss this further in a separate blog post.

After a few hours coding, we began the first of two surprise activities: Alpine Olympics. We split into three teams and undertook the following games:

  • Cow pat golf – Attempting to putt, chip a gold ball in the world’s longest grass into a hole made out of cow pat. Credit goes to Nils Aderman who drove his ball about 20m past the hole with a putter ;)
  • Cow milking – Having reluctantly milked a cow in the past, I was relieved to find out (for the cow’s sake as much as mine) that we would be milking a fake cow. Josh Holmes stole the show on this one apparently having been a dairy farmer in his colourful past.
  • Blow darts – Blow a dart down a tube into a target. Derick Rethans was so accurate he actually hit one of his darts with another
  • Skiing – 5 men, 2 planks of wood and one excellent exercise in co-ordination.
  • Archery – Having broke the first bow with my brute English strength I undertook the task of using the second extremely strong bow only reserved for the strongest of archers. Yuri Yatsev gets an apology here for leaving him bruised the next day having to pull the crossbow back for everyone :p

Whilst my team didn’t win, the team that did kindly shared their victory prize of champagne with the rest of the group which was a nice touch! Another delicious dinner wrapped up a superb evening of fun and games.

Day 2

Another early start proved more difficult than the previous day due to the white wine on offer the previous night. The first talk of the day was given by Corrado Cavalli who gave us an introduction to Silverlight. Whilst I’m not sold on the use of another third-party plugin required to view content in the browser (yes, I’m talking to you Flash) Alex pointed out that Silverlight can also be used to develop Windows Phone 7 apps. I think this is something I’ll definitely be looking into in the next few weeks as all the tools needed to do this are free unlike some other competitors (*cough* Apple *cough*). There’s a great tutorial for Building a Windows Phone 7 twitter application using silverlight if anyone is interested in this too :)

Next up was Alex Weinstein who introduced us to a fantastic tool that’s coming out of Microsoft Labs called Pivot. It allows you to view interesting trends in data sets through a fantastic series of visualizations used to drill down on the data. I’d be very interested to see some tools built for this to export data from relational databases into the required format for pivot to view.

The last talk of the day came from Claudio Caldato who caught my interest with a PHP SDK for interacting with SQL Server Reporting Services. You can do some fantastic things with reporting services so it’s nice that we no longer have to rely on using .NET to interact with it. Great job!

After all the talks and final round of coding was done we were finally told about our surprise dinner which would involve going to a brewery to make our own beer. We learnt about the history of beer and kudos must go to all the people who made the double entrendres whilst learning about the brewing process ;) The highlight of the night came when we were tasked with bottling our own beer. A simple task one might imagine, but without strong hands and patience you can end up spraying litres of beer all over yourself and anyone nearby. Mark from OSC managed to seemingly empty a whole tank of beer on to himself and everyone else in the room. Pictures, videos and other viral material of this will come soon I am sure. Here’s a picture of my beer:

Day 3

Jason Stowe from the SQL Server team gave us a great round up on the features available in SQL Server 2008 including Spatial Data and lots of other interesting tid bits. Then for the rest of the day everyone worked hard on their own individual projects before the final round up from Josh.

Summary

I think everyone agreed the event was a resounding success and everyone learnt a great deal about the technologies Microsoft has been working on. The location, facilities and support that Microsoft gave everyone at the conference worked extremely well. Everyone from Microsoft was helpful, receptive to feedback and friendly throughout the camp which can only go to help improving the relationship Microsoft has within the open source community. A big thanks must go to Yuriy Zaytsev, Nicole Zahnd and Josh Holmes who did an excellent job putting the even together and hopefully we’ll see this event repeated some time in the future!

Photos

http://www.flickr.com/photos/derickrethans/4499789952/ (Derick)
http://www.flickr.com/photos/derickrethans/4499556648/ (Derick)
http://yuriy-zaytsev.smugmug.com/Professional/jumpincamp/11828007_YXa7U#836070437_nZ9YS (Yuri)
http://www.facebook.com/album.php?aid=2057793&id=1385949843 (Vitaly)
http://picasaweb.google.ch/109246690083550473241/JumpInCampBeerDinner?feat=directlink

If anyone has any more photos please send me a tweet