標籤:des http ar io os 使用 sp on 檔案
6月6日,微軟面向中國大陸使用者開放了Microsoft Azure公眾預覽版的申請介面。大家可以申請免費的 beta 試用,收到內附邀請碼的通知訊息後只需輸入啟用碼即可開始免費試用。具體網址為:
http://windowsazure.cn/zh-cn/pricing/free-trial/
在實際使用這個帳號的時候,發現有一些地方需要特別注意。
在使用PowerShell工具中,需要下載發行設定檔(PublishSettingProfile),從而獲得設定Windows PowerShell環境的變數。具體方法是登入Microsoft Azure賬戶的管理入口網站後,訪問下面地址即可獲得:https://windows.azure.com/download/publishprofile.aspx
關於這一操作的說明具體請見:
http://msdn.microsoft.com/en-us/library/windowsazure/jj554332.aspx
但是在使用Windowsazure.cn的帳號的時候,發現無法通過上述方法得到PublishSettingProfile。
經瞭解,需要到下述地址來獲得:
https://manage.windowsazure.cn/publishsettings/index
下載後進行對比,發現兩者檔案格式上有些差異。
通過https://windows.azure.com/download/publishprofile.aspx,獲得格式範例如下:
<?xml version="1.0" encoding="utf-8"?> <PublishData> <PublishProfile PublishMethod="AzureServiceManagementAPI" Url="https://management.core.windows.net/" ManagementCertificate="{Subscription’s management certificate}” <Subscription Id="{Subscription’s ID} " Name="{Subscription’s Name} " /> </PublishProfile> </PublishData>
而在https://manage.windowsazure.cn/publishsettings/index下載的檔案格式為:
<?xml version="1.0" encoding="utf-8"?> <PublishData> <PublishProfile SchemaVersion="2.0" PublishMethod="AzureServiceManagementAPI"> <Subscription ServiceManagementUrl="https://management.core.chinacloudapi.cn" Id="{Subscription’s ID}" Name="{Subscription’s Name} " ManagementCertificate="{Subscription’s management certificate}" /> </PublishProfile> </PublishData>
同時,建議訪問https://github.com/WindowsAzure/azure-sdk-tools,擷取最新的Microsoft Azure Powershell,這樣在使用命令列Import-AzurePublishSettingsFile的時候,不易發生錯誤。
使用 Windows PowerShell 來管理和開發 windowsazure.cn 賬戶的特別注意事項