Azure插入在数据库中失败,但查询正常
我正在尝试插入/替换:Azure插入在数据库中失败,但查询正常,azure,azure-compute-emulator,azure-storage-emulator,Azure,Azure Compute Emulator,Azure Storage Emulator,我正在尝试插入/替换: insertOrReplaceEntity('myusertables', task, function(error) 它总是转到错误代码,指示插入未发生 如何在Azure中调试它 我正在使用Azure emulator,代码中包含: var account = azure.ServiceClient.DEVSTORE_STORAGE_ACCOUNT; var accountKey = azure.ServiceClient.DEVSTORE_STO
insertOrReplaceEntity('myusertables', task, function(error)
它总是转到错误代码,指示插入未发生
如何在Azure中调试它
我正在使用Azure emulator,代码中包含:
var account = azure.ServiceClient.DEVSTORE_STORAGE_ACCOUNT;
var accountKey = azure.ServiceClient.DEVSTORE_STORAGE_ACCESS_KEY;
我在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 } }
如上所述,存储仿真器不支持插入或替换实体或插入或合并实体(称为upsert功能)。这就是为什么在代码中使用insertOrReplaceEntity时会返回错误。如果必须验证代码,则可能需要使用真实的Azure表存储进行检查