views:

241

answers:

2

From Tim Heuer:

In Silverlight 3 we’ve introduced the Client HTTP stack as an option as well. You must opt-in to use the client HTTP handling. This gives you the ability to go more than just GET/POST (i.e., more REST-ful verbs), using response status codes/headers, etc. You can opt-in to use the client HTTP stack on all requests, requests for a specific domain, or on a per-request basis like this:

HttpWebRequest request = (HttpWebRequest)WebRequestCreator.ClientHttp.Create(new Uri(
            http://api.search.live.net/qson.aspx?query=Silverlight));

My understanding is that the reason Silverlight couldn't directly access Azure Storage is that it was unable to sign the http headers with authentication data. Would this bridge the gap and allow direct access to Azure Storage or Mesh? If so, how is that accomplished?

+2  A: 

I'm not sure but you don't want to do this as your secret key would be on the client. Anyone loading your Silverlight code could crack open the binary and find your keys and then manipulate the data as if they were you.

One way to fix this is to proxy your requests through a server you control.

Before you ask, we are aware of this issue but don't have anything to announce now.

Sriram Krishnan
Thanks for pointing that out - this Silverlight app would be more of a "viewer" to let users see their own storage. I'll be sure not to embed my key. Proxying requests through my server would mean I have to pay for the bandwidth so if possible I'd like to avoid that.
James Cadd
If viewers are viewing only their own storage, why don't you make it public? Is there any sensitive content?
Sriram Krishnan
What could I make public? I'm not familiar with "public" options for azure.
James Cadd
The container. When you create a container, you can choose to make it public or private. Public means that anyone read data without auth (but not modification). Private means that read+modify needs auth. If your SL viewer is doing only reads, you could make the container public.
Sriram Krishnan
A: 

I checked and I'm afraid you cannot do this in Silverlight 3. Sorry :-(.

Sriram Krishnan