# Microsoft.Azure.WebJobs.Extensions.Storage：'AzureWebJobsStorage' 的值缺失或为空。

- **ID:** `cloud/azure-function-app-storage-connection-string-missing`
- **领域:** cloud
- **类别:** config_error
- **验证级别:** ai_generated
- **修复率:** 92%

## 根因

Azure Functions 需要将 AzureWebJobsStorage 应用程序设置配置为有效的 Azure 存储帐户连接字符串，以进行内部运行时操作，如 Blob 租约管理和队列处理。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| Azure Functions runtime ~4 | active | — | — |
| Azure Functions runtime ~3 | active | — | — |
| Azure.Storage.Blobs 12.13.0 | active | — | — |
| Microsoft.NET.Sdk.Functions 4.1.3 | active | — | — |

## 解决方案

1. ```
   Add or update the AzureWebJobsStorage app setting with a valid connection string from your Azure Storage account. Example in Azure Portal: Application Settings -> AzureWebJobsStorage = 'DefaultEndpointsProtocol=https;AccountName=mystorageaccount;AccountKey=...;EndpointSuffix=core.windows.net'
   ```
2. ```
   If using Azurite locally, set AzureWebJobsStorage to 'UseDevelopmentStorage=true' in local.settings.json. Example: { "IsEncrypted": false, "Values": { "AzureWebJobsStorage": "UseDevelopmentStorage=true" } }
   ```

## 无效尝试

- **** — The runtime explicitly checks for null or empty strings and throws the same error; it requires a valid connection string. (95% 失败率)
- **** — The Functions host requires this setting for core operations; without it, the runtime cannot start. (100% 失败率)
- **** — The connection string must point to an accessible storage account; network or firewall restrictions cause silent failures. (70% 失败率)
