Azure 函数 Azurite 404 BlobNotFound

Nop*_*pey 2 azure-functions azurite .net-6.0

清理 Azurite 文件夹并重新启动我的 .Net 6 Azure Functions ~4 项目后,出现以下错误:

Azure.RequestFailedException: 'Service request failed.
Status: 404 (The specified container does not exist.)
ErrorCode: ContainerNotFound

Headers:
Server: Azurite-Blob/3.18.0
x-ms-error-code: ContainerNotFound
x-ms-request-id: 94748aff-d2c2-492f-af58-9876fbab8338
Date: Thu, 25 Aug 2022 08:03:14 GMT
Connection: keep-alive
Keep-Alive: REDACTED
'
Run Code Online (Sandbox Code Playgroud)

我的Local.settings.json配置设置为使用本地开发存储:

{
  "IsEncrypted": false,
  "Values": {
    "AzureWebJobsStorage": "UseDevelopmentStorage=true",
    "FUNCTIONS_WORKER_RUNTIME": "dotnet",
    "AzureWebJobsSecretStorageType": "files"
  }
}
Run Code Online (Sandbox Code Playgroud)

我的项目没有任何改变。这是来自 的内部错误BlobLeaseDistributionManager.cs

虽然它可以正确连接到我的本地 Azurite 安装,但它抱怨容器不存在。有没有办法创建这个容器或者可能有不同的解决方案?

Nib*_*Pig 7

检查 Visual Studio 中的异常设置。

我启用了公共语言运行时异常。

异常是设计使然的,实际上,它会抛出很多次。因此,您可以按下“继续”按钮,也可以将它们重置为默认值。

一旦排除了异常,一切都会正确设置。

感谢@Noppey 上面的评论让我找到了这个解决方案。