c# - WindowsAzure.Storage 4.3.0.0 Authentication error calling CloudBlobClient.GetServiceProperties() -
i'm having problemas while using windowsazure.storage api access blob storage , get/set cors properties. code simple, like:
uri uri = new uri("https://eqspprdimgstorage.blob.core.windows.net"); storagecredentials sc = new storagecredentials("myaccountname", "myverylongstring"); cloudblobclient cbc = new cloudblobclient(uri, sc); cbc.getserviceproperties();
while running console app, exception:
"server failed authenticate request. make sure value of authorization header formed correctly including signature."
looking @ fiddler, gives more detail:
the mac signature found in http request '(sharedkeyhere)' not same computed signature. server used following string sign: 'get x-ms-client-request-id:67535105-1492-48c8-97b3-e82b891e3ba7 x-ms-date:thu, 14 may 2015 23:19:35 gmt x-ms-version:2014-02-14 /eqspprdimgstorage/ comp:properties restype:service timeout:90'.
note empty lines in returned message. also, not using kind of proxy, , i'm not using rest .net api. request headers are:
get https://eqspprdimgstorage.blob.core.windows.net/?comp=properties&restype=service&timeout=90 http/1.1 user-agent: wa-storage/4.3.0 (.net clr 4.0.30319.34209; win32nt 6.2.9200.0) x-ms-version: 2014-02-14 x-ms-client-request-id: 67535105-1492-48c8-97b3-e82b891e3ba7 x-ms-date: thu, 14 may 2015 23:19:35 gmt authorization: sharedkey eqspprdimgstorage:(sharedkeyhere) host: eqspprdimgstorage.blob.core.windows.net connection: keep-alive
finally, other notes: - i've used exacly same account data in cloudberry explorer azure blob storage , can see values of properties.
i've seen other samples on net (such this: http://blog.codingoutloud.com/2014/02/21/stupid-azure-trick-6-a-cors-toggler-command-line-tool-for-windows-azure-blobs/) don't seem work.
the blob's contents accessible publicly in browser: http://eqspprdimgstorage.blob.core.windows.net/imgs/card%20images/icone-novo-635664320392396931.png
any ideas? i'm kind of stumped , frustrated @ lack of information on topic (had similar experience while writing sb queues using mono/raspberrypi2 , rest api, unfortunatelly).
Comments
Post a Comment