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 } }

没有正确的解决方案

其他提示

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top