Mashing Up Data On the Web and Windows Phone with Windows Azure DataMarket

Sign in to queue

The Discussion

  • User profile image
    Pawel

    Great seasion.
    How to access Azure DataMarket Data from windows phone 7 without Container.Credetials property?
    Regards
    Pawel

  • User profile image
    Max

    Thanks!
    Add the key as header to the request. For example:
    --------------
    PropertyDetailsApiContainer cont = new PropertyDetailsApiContainer(new Uri("https://api.datamarket.azure.com/Data.ashx/Alteryx/ConsumerExpenditureData/"));
    cont.SendingRequest += new EventHandler<SendingRequestEventArgs>((e, v) =>
    {
    Utility.AddUserKeyAsHeader(v.RequestHeaders, false);
    });
    ....
    Byte[] authbytes = UTF8Encoding.UTF8.GetBytes("key:<TBD:insert your account key>");
    headers["Authorization"] = "Basic " + Convert.ToBase64String(authbytes);
    ...
    --------------

    Thanks,
    Max

Add Your 2 Cents