簡體   English   中英

Windows Azure Powershell部署錯誤 - “遠程服務器返回了意外響應”

[英]Windows Azure Powershell Deployment Error - “The remote server returned an unexpected response”

我正在關注最新的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

然后運行下一步 -

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

給出了這個錯誤。

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

任何人都可以建議我哪里出錯了?

找到此鏈接詳細說明了沒有解決方案的相同問題。

該示例提供了此信息

要點 :Set-Deployment cmdlet假定計算服務和存儲服務名稱相同。 如果不是這種情況,請指定其他參數-StorageServicename,將占位符替換為存儲服務名稱的名稱。

我的存儲服務名稱與計算服務的名稱相同,但添加該參數使其工作,

即。

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  

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM