You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

部署Azure Storage文件服务/共享时遇HTTP头格式错误求助

Azure存储文件共享部署错误(InvalidHeaderValue)解决建议

问题描述

部署Durable Function应用过程中,部署Azure Storage的fileServices/shares资源时触发格式类错误。

错误信息

{
    "error": {
        "code": "InvalidHeaderValue",
        "message": "The value for one of the HTTP headers is not in the correct format.\nRequestId:6c0b3fb0-701a-0058-0509-a8af5d000000\nTime:2022-08-04T13:49:24.6378224Z"
    }
}

关联ARM模板片段

{
    "type": "Microsoft.Storage/storageAccounts/fileServices/shares",
    "apiVersion": "2021-09-01",
    "name": "[concat(parameters('storageAccount1_name'), '/default/FuncAppName')]",
    "dependsOn": [
        "[resourceId('Microsoft.Storage/storageAccounts/fileServices', parameters('storageAccount1_name'), 'default')]",
        "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccount1_name'))]"
    ],
    "properties": {
        "accessTier": "TransactionOptimized",
        "shareQuota": 5120,
        "enabledProtocols": "SMB"
    }
}

解决建议

  • 检查文件共享名称合规性:模板中FuncAppName部分需符合Azure文件共享命名规则——仅允许小写字母、数字和连字符,不能以连字符开头或结尾,长度限制在3-63字符。若FuncAppName是参数,确认传入值是否合规;若为硬编码,直接调整为符合规则的名称。
  • 验证存储账户与协议匹配:SMB协议要求存储账户为标准类型(如Standard_LRS/GRS)或高级类型(Premium_LRS),若存储账户配置为NFS专用类型则会触发错误,需调整存储账户类型或修改enabledProtocols参数。
  • 简化依赖配置:删除对Microsoft.Storage/storageAccounts/fileServices资源的依赖,default文件服务是存储账户创建时自动生成的,仅保留对存储账户本身的依赖即可,避免时序问题导致的头部格式错误。
  • 升级API版本:将模板的apiVersion升级至最新稳定版(如2023-01-01),旧版本API可能存在已知的HTTP头部处理缺陷。

内容的提问来源于stack exchange,提问作者wilson_smyth

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.24 07:24:19