Windows Azure Powershell部署错误 - "远程服务器返回了意外响应"

Pau*_*and 5 powershell azure azure-deployment

我正在关注最新的2011年2月Azure培训套件示例.

我已成功部署使用

New-Deployment -serviceName xxxxmytodo99 
                   -subscriptionId cxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 
                   -certificate (get-item cert:\CurrentUser\MY\xxxxxxxxxxxx)
                   -slot staging 
                   -package MyTodo.cspkg
                   -configuration ServiceConfiguration.cscfg 
                   -label "v2.0" 
                   -storageServiceName xxxxmytodo99
Run Code Online (Sandbox Code Playgroud)

然后运行下一步 -

Get-HostedService -serviceName xxxxmytodo99
                  -subscriptionId cxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 
                  -certificate (get-item cert:\CurrentUser\MY\xxxxxxxxxxxx) 
    | Get-Deployment staging 
    | Set-Deployment -package MyTodo.cspkg 
                     -configuration ServiceConfiguration.cscfg 
                     -label "v2.1" 
    | Get-OperationStatus -WaitToComplete
Run Code Online (Sandbox Code Playgroud)

给出了这个错误.

Set-Deployment : The remote server returned an unexpected response: (400) Bad Request.
At line:1 char:232
+ Get-HostedService -serviceName xxxxmytodo99 -subscriptionId cxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx  -certificate (get-item cert:\CurrentUser\MY\xxxxxxxxxxxx) | Get-Deployment staging | Set-Deployment <<<<  -package MyTodo.cspkg -configuration ServiceConfiguration.cscfg -label "v2.2" | Get-OperationStatus -WaitToComplete
    + CategoryInfo          : CloseError: (:) [Set-Deployment], ProtocolException
    + FullyQualifiedErrorId : Microsoft.Samples.AzureManagementTools.PowerShell.HostedServices.SetDeploymentCommand
Run Code Online (Sandbox Code Playgroud)

任何人都可以建议我哪里出错了?

找到此链接详细说明了没有解决方案的相同问题.

Pau*_*and 4

该示例给出了这些信息

重要提示:Set-Deployment cmdlet 假定计算服务和存储服务名称相同。如果不是这种情况,请指定附加参数 -StorageServicename ,将占位符替换为存储服务名称。

我的存储服务名称确实与计算服务名称相同,但添加该参数使其可以工作,

IE。

Get-HostedService -serviceName xxxxmytodo99 
                  -subscriptionId cxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 
                  -certificate (get-item cert:\CurrentUser\MY\xxxxxxxxxxxx) 
        | Get-Deployment staging
        | Set-Deployment -package MyTodo.cspkg 
                         -configuration ServiceConfiguration.cscfg 
                         -storageServiceName xxxxmytodo99 
                         -label "v2.2" 
    | Get-OperationStatus -WaitToComplete  
Run Code Online (Sandbox Code Playgroud)