InvalidXmlDocument: XML 指定的语法无效

InvalidXmlDocument: XML specified is not syntactically valid

我遵循以下教程 https://docs.microsoft.com/en-us/azure/storage/common/storage-account-move?tabs=azure-portal 当我部署资源时它说验证通过但随后部署失败并出现以下错误,

{
  "code": "DeploymentFailed",
  "message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.",
  "details": [
    {
      "code": "InvalidXmlDocument",
      "message": "XML specified is not syntactically valid.\nRequestId:xxxx-xxx-xxx-36f2-xxx\nTime:2021-08-23T07:41:21.5159975Z"
    }
  ]
}

只有 json 文件而没有任何地方 XML?只需导出模板并部署。

阅读了很多,

https://docs.microsoft.com/en-us/answers/questions/340510/arm-templates-storageaccountsfileservices-error-34.html

我已经从 template.json 文件中删除了 fileServices、queueServices 和 tableServices,并且可以正常工作。

该错误很可能是由元素 fileServicesqueueServices and/or 中的空属性引起的您的 ARM-template.

中的 tableServices

例如:

"smb": {},
"cors": {
"corsRules": []
}

您不必删除元素,只需删除属性。有时您需要这些元素,这就是为什么我不建议您在不知道是否需要时删除它们的原因。很可能它在幕后生成了一些 XML 并抛出了你得到的错误(虽然不确定)。

示例:

Remove the properties from the template.