2011-12-27 64 views
2

Azure項目我使用Azure的培訓工具包命令問題與部署使用PowerShell 2

New-Deployment 
    -serviceName <YOUR_SERVICE_NAME_LOWER_CASE> 
    -subscriptionId <YOUR_SUBSCRIPTION_ID> 
    -certificate (get-item cert:\CurrentUser\MY\<YOUR_CERTIFICATE_THUMBPRINT>) 
    -slot staging 
    –package <PACKAGE_LOCATION> 
    -configuration <CONFIGURATION_LOCATION> 
    -label "v2.0" 
    –storageServiceName <YOUR_STORAGE_SERVICE_NAME_LOWER_CASE> 

部署我Azure的應用程序。它能夠上傳包到blob對象,而是創建一個新的部署時,它顯示的錯誤爲:

New-Deployment : Cannot access a closed Stream. 
At line:1 char:15 
+ New-Deployment <<<< -serviceName mytodo -subscriptionId xxxxxxxxx 
8ad-360cdbdc361f -certificate (get-item cert:\CurrentUser\MY\xxxxxxxx 
6DD27E3DFF5F7FE24A3FBF) -slot staging -package MyTodo.cspkg -configuration Serv 
iceConfiguration.cscfg -label "v1.0" -storageServiceName xxxxx 
    + CategoryInfo   : CloseError: (:) [New-Deployment], ObjectDisposed 
    Exception 
    + FullyQualifiedErrorId : Microsoft.WindowsAzure.Samples.ManagementTools.P 
    owerShell.Services.HostedServices.NewDeploymentCommand 

回答

0

你有一個本地代理(例如小提琴手)運行?如果是這樣,你需要禁用它。

此外,檢查證書是否正確安裝,並在正確的地方:這裏跟隨,至信,說明:

http://msdn.microsoft.com/en-us/gg271300

特別

指出有在路徑中沒有換行或空格爲(get-Item cert:\CurrentUser\MY\XXXXX)

+0

謝謝你的回答。基於http://msdn.microsoft.com/en-us/gg271300,我發現我錯過了在azure上創建主機服務。我認爲它會自動爲我創建。 – user1117239 2011-12-27 08:05:02

+0

你能澄清一下嗎?缺少什麼? – 2011-12-27 08:17:47