Azure Cosmos DB 模拟器:升级到 2.9.2 后未经授权

Azure Cosmos DB Emulator: Unauthorized after upgrate to 2.9.2

我将 Azure Cosmos DB 模拟器升级到 2.9.2

在 2.9.2 之前工作起来很有魅力,但现在,在 Explorer 部分中遗漏了我丢失数据但这是预期的(而且我没有抱怨)我得到了这两个错误

Error while querying offers: {"code":401,"body":{"code":"Unauthorized","message":"The input authorization token can't serve the request. Please check that the expected payload is built as per the protocol, and check the key being used. Server used the following payload to sign: 'get\noffers\n\nfri, MYDATE \n\n'\r\nActivityId: MYID, Microsoft.Azure.Documents.Common/2.9.2"},"headers":{"access-control-allow-credentials":"true","access-control-allow-origin":"","content-location":"https://localhost:8080/offers","content-type":"application/json","date":"MYDATE","server":"Microsoft-HTTPAPI/2.0","transfer-encoding":"chunked","x-ms-activity-id":"MYID","x-ms-gatewayversion":"version=2.9.2","x-ms-throttle-retry-count":0,"x-ms-throttle-retry-wait-time-ms":0},"activityId":"MYID"}

还有这个:

Error while refreshing databases: {"code":401,"body":{"code":"Unauthorized","message":"The input authorization token can't serve the request. Please check that the expected payload is built as per the protocol, and check the key being used. Server used the following payload to sign: 'get\noffers\n\nfri, MYDATE \n\n'\r\nActivityId: MYID, Microsoft.Azure.Documents.Common/2.9.2"},"headers":{"access-control-allow-credentials":"true","access-control-allow-origin":"","content-location":"https://localhost:8080/offers","content-type":"application/json","date":"MYDATE","server":"Microsoft-HTTPAPI/2.0","transfer-encoding":"chunked","x-ms-activity-id":"MYID","x-ms-gatewayversion":"version=2.9.2","x-ms-throttle-retry-count":0,"x-ms-throttle-retry-wait-time-ms":0},"activityId":"MYID"}

如果我尝试创建一个新数据库:

Error while creating database asd: {"code":401,"body":{"code":"Unauthorized","message":"The input authorization token can't serve the request. Please check that the expected payload is built as per the protocol, and check the key being used. Server used the following payload to sign: 'post\ndbs\n\n"MYDATE2" \n\n'\r\nActivityId:MYID2, Microsoft.Azure.Documents.Common/2.9.2"},"headers":{"access-control-allow-credentials":"true","access-control-allow-origin":"https://localhost:8080","access-control-expose-headers":"Access-Control-Allow-Origin,Access-Control-Allow-Credentials,Content-Type,x-ms-activity-id,x-ms-gatewayversion","content-type":"application/json","date":"MYDATE2 GMT","server":"Microsoft-HTTPAPI/2.0","transfer-encoding":"chunked","x-ms-activity-id":"MYID2","x-ms-gatewayversion":"version=2.9.2","x-ms-throttle-retry-count":0,"x-ms-throttle-retry-wait-time-ms":0},"activityId":"MYID2"}

我尝试了这个类似话题的答案,但我一无所获

MYID、MYID2、MYDATE 和 MYDATE2 只是占位符,我在设置中更改了原始值。

更新
这里SDK报错

来源:
System.Private.CoreLib / Microsoft.Azure.DocumentDB.Core

留言:

The input authorization token can't serve the request. Please check that the expected payload is built as per the protocol, and check the key being used. Server used the following payload to sign: 'get

mon, 02 mar 2020 11:01:04 gmt

' ActivityId: b6a56fc2-093d-4154-a4d6-d64ca08d167d, Microsoft.Azure.Documents.Common/2.9.2, Windows/6.3.9600 documentdb-netcore-sdk/2.6.0

我运行这个参数的模拟器

/AllowNetworkAccess /KeyFile=generatedKey /NoFirewall /Port=8080

所以...存储在文件 "generatedKey" 中的密钥(使用参数 /GenFileKey 生成)导致了我所有的麻烦!

我用默认密钥更改了存储在文件中的密钥,然后再次运行!