Question

I am trying to do an Insert/replace :

          insertOrReplaceEntity('myusertables', task, function(error)

it always goes to error code indicating that insertion did not happen.

How to debug this in Azure?

I am using the Azure emulator and have in the code:

var account = azure.ServiceClient.DEVSTORE_STORAGE_ACCOUNT;
var accountKey = azure.ServiceClient.DEVSTORE_STORAGE_ACCESS_KEY;

I get PUT failed with 403.

{ error:
   { [Error: Server failed to authenticate the request. Make sure the value of Authorization header is formed correctl
including the signature.]
     code: 'AuthenticationFailed',
     message: 'Server failed to authenticate the request. Make sure the value of Authorization header is formed correc
y including the signature.' },
  response:
   { isSuccessful: false,
     statusCode: 403,
     body:
      { '@': [Object],
        code: 'AuthenticationFailed',
        message: [Object] },
     headers:
      { 'content-length': '356',
        'content-type': 'application/xml',
        server: 'Microsoft-HTTPAPI/2.0',
        date: 'Mon, 12 Nov 2012 20:57:10 GMT' },
     md5: undefined } }

No correct solution

OTHER TIPS

As Described here the storage emulator does not support Insert-Or-Replace Entity or Insert-Or-Merge Entity, known as upsert features. That's why when you use insertOrReplaceEntity in your code it return an error. If you have to verify the code, you may need to check it with the real Azure Table Storage.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top