【问题标题】:Use New-AzureDeployment to deploy cloud service, But error occurs "The HTTP version specified is not supported for this operation by the server"使用New-AzureDeployment部署云服务,报错“服务器不支持此操作指定的HTTP版本”
【发布时间】:2013-01-05 12:00:53
【问题描述】:

PS C:> New-AzureDeployment -ServiceName "TestAutoDeploy" -Slot "Production" -Package "d:\builds\a.cspkg" -Configuration “d:\builds\a.cscfg”-标签“MyDeployment”

New-AzureDeployment :服务器不支持此操作指定的 HTTP 版本。 在行:1 字符:20 + 新 AzureDeployment

【问题讨论】:

  • 欢迎来到 Stackoverflow。请向我们提供更多有关您的问题的背景信息,以便我们为您提供更多帮助。

标签: azure cloud azure-storage powershell-cmdlet autodeploy


【解决方案1】:

在尝试在订阅中执行操作之前,请确保您已通过调用 Set-AzureSubscription 设置订阅详细信息:

$certPath = "cert:\LocalMachine\MY\<your management cert's thumbprint>"
$azure_cert = get-item $certPath

Set-AzureSubscription -SubscriptionName "Your Subcription Name" -SubscriptionId "azure_sub_id" -Certificate $azure_cert -CurrentStorageAccount "azure_storage"

在此处阅读更多信息 - http://msdn.microsoft.com/en-us/library/windowsazure/jj554332.aspx

编辑:包不能是本地文件。指定同一订阅/项目中存储中的 .cspkg blob 的路径或 URI。

【讨论】:

  • 您好 viperguynaz,感谢您的回复,我已使用命令 Import-AzurePublishSettingsFile 导入 publishSettings 文件并调用 Set-AzureSubscription –SubscriptionName "xxxxxxxxxx" -CurrentStorageAccount "xxxxxxx",设置默认存储帐户。 “New-AzureService”和“Remove-AzureService”功能运行良好。看来存储服务不支持该操作
  • 更新答案,-Package 需要在同一个订阅/项目中指定一个 Blob。
  • 正确,似乎不支持本地文件,我已将 cspkg 上传到 blob,他们执行命令,它成功。感谢您的帮助
  • Old MS example powershell script 显示使用本地路径进行 New-AzureDeployment。但是,我遇到了与 OP 相同的 HTTP 错误。我怀疑这与该示例之后对 blob API 的更改有关(例如现在强制使用 HTTPS)。
猜你喜欢
  • 2022-08-02
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-12-15
相关资源
最近更新 更多