Archive for July, 2008

Serve PDF as inline attachments – WCF REST style

No Comments »

Some time ago, a user with the nickname refaeldakar asked in the WCF/MSDN forum how he could serve PDFs with the WebHttpBinding so that where shown as inline attachments in the web browser.

I wrote a small test application that did what he asked for. The trick here is to add an extra HTTP header to the outgoing response to the web browser; Content-disposition: “inline; filename=filenamehere.pdf".

The code can be found on here.


Visual Studio Team System 2008 installation WTF

No Comments »

vs2k8_wtf_messenger

Dependency on Live Messenger !?


Unity 1.1 Container Behavior for WCF

1 Comment »

Some time ago I needed a way to wire up an IoC container in a WCF service I was creating at that time. Since I’ve used ObjectBuilder-based containers a lot in both Composite UI Application Block and Enterprise Library, I wanted to take a closer look at the Unity container and the 2.0 version of ObjectBuilder.

To manage the creation of service instances, you have to implement the IInstanceProvider interface, and wire up the concrete type in a service behavior.

The code should be fairly documented, and a simple xUnit.NET test project is included. If you want to check out xUnit.NET, check out its CodePlex site.

I’ve put the code on a new resource page on code.msdn.microsoft.com that I have created WCF Resources. You can find the release here.


Product Test: IKEA “Bräda” Lap Pillow

No Comments »

Yesterday we went to IKEA to buy a bunch of stuff from our TODO list (turned out we actually forgot the handwritten list) and we ended up buying pretty much nothing. Partially because we didn’t remember all the items on the list, and partially because the where sold out.

When we moved through the Office department, containing nothing on our initial list, I noticed something I wanted to try for a long time; a laptop lap pillow. This thing is designed for two things; prevent lap / thighs to burn up (and for the male part of the population; ensuring that you have an OK sperm count the next time you try to reproduce) and see to that the laptop stays stabile in your lap.

My new-bought “Bräda” has a pillow filled with tiny Styrofoam balls and has a plastic table on the top that you put the laptop of choice on. On the side of the pillow, it has a small pocket where you can put your cellular phone, office supplies or whatever in. This blog post is in fact written on top of “Bräda”, and I am quite happy with it, even though I’ve only used it for half an hour or so.

Priced at about $18 it is something I would recommend everyone (male or not :-P )

IKEA_brada

Product Link


New PDC’08 sessions published – 10 is the new 6!

No Comments »

Found out through the PDC’08 Facebook group today that they have published 16 sessions. A couple of weeks ago, I read on Don Box’ blog that 10 is the new 6 but I didn’t exactly understand why. It is a mantra of the VC++ team and is refering to the long-living version 6 (with a lot of service packs) of Visual Studio. I am not sure if this is a signal that they want to stabilize around the upcoming (upcoming, like in next year or so) version 10 / Rosario of VSTS.

Read more here:
http://blogs.msdn.com/pdc/archive/2008/07/01/new-sessions-published.aspx