locked
Can't get copy blob to work RRS feed

  • Question

  • i'm sorry, but i have to say that the rest api is ridiculously complicated and the documentation is a joke. i can't find any sample code for this function.

    from what i've been able to figure out, i was able to create a copy blob request, but i'm getting this error. note the truncated error message after the "PUT". this error message is meaningless to me.

    <AuthenticationErrorDetail>The MAC signature found in the HTTP request 'azkMwbw2/oXwVzLN9OOJMM0bWcEXJPfEBIRK1iomwO8=' is not the same as any computed signature. Server used following string to sign: 'PUT
    
    
    0
    
    
    
    
    
    
    
    
    x-ms-copy-source:http://atilektneur01.blob.core.windows.net/vhdsource/_datadiskdb.vhd?sv=2012-02-12&amp;sr=b&amp;se=YYYY-09-DDT09%3a16TZD&amp;sp=r&amp;sig=52UwaFpinO45zgnjn4Mi%2bApPmZV5Ys6XR6rDKSN%2fj%2f0%3d
    x-ms-date:Thu, 06 Sep 2012 07:16:59 GMT
    x-ms-version:2012-02-12
    /atilektneur02/vhdtarget/_datadiskdb.vhd'.</AuthenticationErrorDetail>

    Thursday, September 6, 2012 7:35 AM

Answers

  • How did you make the call? What programming language are you using? If C#, did you use the storage client library? You'd need to get version 1.7.1 on GitHub, which is newer than what ships in the SDK. With that library, you can just call StartCopyFromBlob(...).

    The error message isn't truncated. There's a newline after "PUT," and the string continues until the closing single quote.

    Windows Azure storage authentication works by verifying a signature. You (the client) compute a signature and send it with your web request. The server then computes the signature again and makes sure that it matches yours (proving that you have the proper storage key).

    What this error message is telling you is that the signature on the web request didn't match the signature that was computed on the server. The server used the string in this message ("PUT\n\n\n\n0\n...x-ms-copy-source:...") to compute the signature. If you used a different string, this message lets you figure out what the difference is. This is really only relevant if you wrote the signature code yourself.

    Thursday, September 6, 2012 8:19 AM
  • Another thing I noted is the URL for copy blob. Please see the "se" querystring parameter:

    x-ms-copy-source:http://atilektneur01.blob.core.windows.net/vhdsource/_datadiskdb.vhd?sv=2012-02-12&amp;sr=b&amp;se=YYYY-09-DDT09%3a16TZD&amp;sp=r&amp;sig=52UwaFpinO45zgnjn4Mi%2bApPmZV5Ys6XR6rDKSN%2fj%2f0%3d

    It looks like you used incorrect date/time format. Should have been "yyyy-MM-ddTHH:mm".

    Can you try changing it and see if the request succeeds.

    Thursday, September 6, 2012 1:40 PM

All replies

  • How did you make the call? What programming language are you using? If C#, did you use the storage client library? You'd need to get version 1.7.1 on GitHub, which is newer than what ships in the SDK. With that library, you can just call StartCopyFromBlob(...).

    The error message isn't truncated. There's a newline after "PUT," and the string continues until the closing single quote.

    Windows Azure storage authentication works by verifying a signature. You (the client) compute a signature and send it with your web request. The server then computes the signature again and makes sure that it matches yours (proving that you have the proper storage key).

    What this error message is telling you is that the signature on the web request didn't match the signature that was computed on the server. The server used the string in this message ("PUT\n\n\n\n0\n...x-ms-copy-source:...") to compute the signature. If you used a different string, this message lets you figure out what the difference is. This is really only relevant if you wrote the signature code yourself.

    Thursday, September 6, 2012 8:19 AM
  • Another thing I noted is the URL for copy blob. Please see the "se" querystring parameter:

    x-ms-copy-source:http://atilektneur01.blob.core.windows.net/vhdsource/_datadiskdb.vhd?sv=2012-02-12&amp;sr=b&amp;se=YYYY-09-DDT09%3a16TZD&amp;sp=r&amp;sig=52UwaFpinO45zgnjn4Mi%2bApPmZV5Ys6XR6rDKSN%2fj%2f0%3d

    It looks like you used incorrect date/time format. Should have been "yyyy-MM-ddTHH:mm".

    Can you try changing it and see if the request succeeds.

    Thursday, September 6, 2012 1:40 PM