0

我无法弄清楚如何在下面的步骤中设置授权

    static string _address = "http://Foo.table.core.windows.net/BackupEntries()?select=RowKey";

    static void Main(string[] args)
    {

        // Create an HttpClient instance
        HttpClient client = new HttpClient();
        client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("aa", "");
4

2 回答 2

0

As pointed out by Steve Marx, please sign the request. You can find the detailed authentication schema on http://msdn.microsoft.com/en-us/library/windowsazure/dd179428.aspx. It’s not difficult to sign the request, but the process can be a bit complicated. You can search the web to find some examples, such as http://blog.einbu.no/2009/08/authenticating-against-azure-table-storage/.

Best Regards,

Ming Xu.

于 2012-04-23T09:18:31.010 回答
-1

这是旧的,但你可以试试

    string Userid = string.Empty;
    string Pwd = string.Empty;



        byte[] bytes = Encoding.ASCII.GetBytes(String.Format("{0}:{1}", Userid, Pwd));
        var authorization = "basic " + Convert.ToBase64String(bytes);
        fr.Headers.Add("Authorization", authorization);
于 2012-04-21T15:27:36.500 回答