作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在关注 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
谁能告诉我哪里出错了?
找到this link详细说明尚未解决的相同问题。
最佳答案
该示例提供了此信息
Important: The Set-Deployment cmdlet assumes that the compute service and storage service names are the same. If this is not the case, specify an additional parameter -StorageServicename , replacing the placeholder with the name of the storage service name.
我的存储服务名称确实与计算服务名称相同,但添加该参数使其可以正常工作,
即。
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
关于powershell - Windows Azure Powershell 部署错误 - "The remote server returned an unexpected response",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5346919/
我是一名优秀的程序员,十分优秀!