Fileuploads through Windows Azure Mobile Services - take 2

So a couple of weeks ago I posted this blog post on how to upload files to blob storage through Mobile Services. In it, I described how one could do a Base64 encoded string upload of the file, and then let the mobile service endpoint convert it and send it to blob storage.

The upsides to this is that the client doesn’t have to know anything about where the files are actually stored, and it doesn’t need to have blob storage specific code. Instead, it can go on happily knowing nothing about Azure except Mobile Services. It also means that you don’t have to distribute the access keys to your storage together with the application.

I did however mention that there was another way, using shared access signatures (SAS). Unfortunately, these have to be generated by some form of service that has knowledge of the storage keys. Something like a Azure compute instance. However, paying for a compute instance just to generate SASes (plural of SAS…?) seems unnecessary, which is why I opted to go with the other solution.


SignalR Demo Code from the 1st Wednesday presentation

So…here is the code that I promised the people participating at the 1st Wednesday presentation last night. It worked straight up when I tried rebuilding the whole thing, so hopefully the code in this zip will work for you all. If not, let me know and I will fix it somehow… Code: (1.24 mb)

Trying Out Azure Service Bus Relay Load Balancing

As you might have noticed from previous posts, I am somewhat interested in the Azure Service Bus. Why? Well, why not? To be honest, I don’t actually know exactly why, but I feel that it offers something very flexible out of the box, and without to much hassle.

One of the later feature that was added to it is the support for load balancing when using message relaying. (You can read more about message relaying here)

It is pretty cool, and just works… And by just works, I mean it really just works. If you have a service using message relaying today, adding another instance will automatically enable the feature. But remember, the messages are delivered to ONE of the services, not both. So if your service cannot handle that, make sure you change the implementation to make sure that only one instance is running at any time.


SignalR and Silverlight

SignalR is a somewhat newish open source project that makes it possible to simulate push notifications on the web. It does so using long-polling (websockets available as an extra download), so it isn’t true push as such, but it gives the appearance of push. And on top of that, it is so ridiculously simple to set up…

Unfortunately, the NuGet package for SignalR doesn’t include the Silverlight client, which the GitHub project does. This is most likely going to be fixed in the near future, but currently you will have to do it the manual way instead of using NuGet.

The server part of SignalR works fine through NuGet, however, it doesn’t play nice with the Silverlight version as a property has been renamed and causes issues. So we have to do the whole thing manually to make sure both the client and server has the modified property… Once again, it is probably going to be fixed some time really soon.


Data binding images with MVVM

The title for this post make it sound like the world’s simplest thing. And to be honest, it sort of is. It is not hard to get images from the ViewModels into the view, but there are several ways of doing it. Each with its own pros and cons.

In my world, my VMs often get urls/uris to images instead of the actual image. The reason for this I guess is sort of the same thing as why you shouldn’t store your images in the database. The models can become huge if they include the images, especially if we add a couple different image sizes and so on. And that is without considering the possibility of us transferring a whole array of these objects across the wire. And in a lot of cases we don’t even show all the images in the UI, so why would we pass the images along if we don’t need them…


I got to leave my mark on TechEd US

As you probably know, TechEd US has just passed. I didn’t get to go (like always), but I did get to make my mark on the conference. I got to build one of the apps that Microsoft demoed on stage. I have actually built a bunch of demo apps for Microsoft and their conferences the last year. At some point, I will actually try to find them at some point a post some videos of them here. But they involve a CRM demo with a phone company, a SharePoint demo with a racing team and some other bits and pieces. Anyhow…this year my demo was a Word add-in, and my personal opinion about this project, before it got started, was that it sucked. I I’m not very fond of building Word add-ins as you might have guessed.


Globalization Demo from Developer Summit '08

At the EPiServer developer summit a couple of weeks ago I held a session about multilanguage support in EPiServer. For those of you who were there, you know why I've added this entry. I screwed up the demo completely and promised to upload the demo code to my blog. My, at that moment, not existing blog. So here it is. I've created a blog and added the code for download.