在 cosmosdb 模拟器中出现错误 403 "Database Account localhost does not exist"

Getting error 403 in cosmosdb emulator "Database Account localhost does not exist"

您好,我开始使用 cosmos 模拟器时经常出现此错误,请帮助我解决此问题。

升级模拟器后遇到这个问题。重新安装后重置数据解决了它:

If you installed a new version of the emulator and are experiencing errors, ensure you reset your data. You can reset your data by right-clicking the Azure Cosmos Emulator icon on the system tray, and then clicking Reset Data

这会导致数据丢失,所以在升级模拟器之前一定要备份。