2

挿入/置換を実行しようとしています:

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

挿入が行われなかったことを示すエラーコードが常に表示されます。

Azureでこれをデバッグする方法は?

私はAzureエミュレーターを使用しており、コードには次のようなものがあります。

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

PUTが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 } }
4

1 に答える 1

1

ここで説明されているように、ストレージ エミュレーターは、アップサート機能として知られるエンティティの挿入または置換またはエンティティの挿入またはマージをサポートしていません。そのため、コードで insertOrReplaceEntity を使用するとエラーが返されます。コードを確認する必要がある場合は、実際の Azure Table Storage で確認する必要がある場合があります。

于 2012-11-14T05:51:07.833 に答える