I have a WPF application that uses Windows Azure as the backend. I use SQL Azure to store data that are accessed by the WPF application through a WCF service. I need to be a
As @Blam pointed out, Blob Storage is a much better way to store large binary objects. Each blob has a URI that looks like https://mystorage.blob.core.windows.net/somecontainer/someblob.jpg
. Each blob may be up to 200GB. You can easily store a blob's URI in SQL Azure, along with related metadata.
You then have a choice of either returning an image through your WCF service or providing direct access. With the former, you'd basically make a call to blob storage, from your WCF service implementation, to retrieve the blob, then return it in the WCF response.
With the latter, it gets a bit trickier. You have a choice of making blobs public or private. Public blobs are great for logos, CSS, and other information that doesn't require user permissions to view. Private blobs require use of your storage account key (which you should never give out). However, using a feature called Shared Access Signature, you can provide a URL with a special hash on the querystring, providing temporary access (up to 1 hour). The basic tradeoff: If you go through the WCF service for binary file download, your code will work as it would with any other WCF service, but you may find yourself scaling out to multiple instances of your Azure VM to support increased load. If you go with Shared Access Signatures, you'll likely need to modify your WPF app to grab a binary file based on a URL. However, this would take load off your WCF service, as you'd then be accessing Blob Storage directly to download binary content (which is a massive-scale multi-tenant storage system managed by Windows Azure).
See here for Windows Azure Storage pricing. At under 13 cents per GB, it's significantly less expensive than SQL Azure.
Azure blobs. SQL Azure is expensive compared to blobs.
http://www.windowsazure.com/en-us/home/features/storage/