Authentication using azure storage Blob rest API giving error RRS feed

  • Question

  • I am trying to access blob container using rest API But its giving this error


    <?xml version="1.0" encoding="utf-8"?>
        <Message>Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
        <AuthenticationErrorDetail>The MAC signature found in the HTTP request 'cZVLNdLZqhN33hO0J94SF2aR1BCZM13zRdYJTn5sivU=' is not the same as any computed signature. Server used following string to sign: 'GET

    x-ms-date:Mon, 03 Nov 2014 09:58:28 GMT


    I have checked my header string before encoding its also coming the same as it mention the string  in the error


    x-ms-date:Mon, 03 Nov 2014 09:57:00 GMT

    so where is the error.Is this in encoding code, i am using this c# code for encoding the header signature                 


    hasher = new System.Security.Cryptography.HMACSHA256(Convert.FromBase64String(Secretkey));

                    // Authorization header
                    string authH = "SharedKey " + _Account + ":" + System.Convert.ToBase64String(hasher.ComputeHash(System.Text.Encoding.UTF8.GetBytes(signature)));

                  // Add the Authorization header to the request
                    request.Headers.Add("Authorization", authH);  

    So Please hep me to resolve this issue.   Regards, Ashok

    Monday, November 3, 2014 11:51 AM


All replies