WebSiteOperationsExtensions.GeneratePasswordAsync 方法 (IWebSiteOperations, String, String)
透過發出 HTTP POST 要求,您可以產生新的隨機密碼以發行網站。 提示:如果您想要確認發行密碼已變更,發出 HTTP GET /publishxml 上呼叫 /newpassword 之前。 在發行 XML 中,記下 userPWD 屬性中的雜湊值。 在呼叫 /newpassword 之後, 再次呼叫 /publishxml。 然後您就可以比較發行 XML 中使用您先前記下 userPWD 的新值。 (請參閱 https://msdn.microsoft.com/en-us/library/windowsazure/dn236428.aspx 如需詳細資訊)
命名空間: Microsoft.WindowsAzure
組件: Microsoft.WindowsAzure.Management.WebSites (在 Microsoft.WindowsAzure.Management.WebSites.dll 中)
語法
public static Task<OperationResponse> GeneratePasswordAsync(
this IWebSiteOperations operations,
string webSpaceName,
string webSiteName
)
public:
[ExtensionAttribute]
static Task<OperationResponse^>^ GeneratePasswordAsync(
IWebSiteOperations^ operations,
String^ webSpaceName,
String^ webSiteName
)
static member GeneratePasswordAsync :
operations:IWebSiteOperations *
webSpaceName:string *
webSiteName:string -> Task<OperationResponse>
<ExtensionAttribute>
Public Shared Function GeneratePasswordAsync (
operations As IWebSiteOperations,
webSpaceName As String,
webSiteName As String
) As Task(Of OperationResponse)
參數
operations
Type: Microsoft.WindowsAzure.Management.WebSites.IWebSiteOperationsMicrosoft.WindowsAzure.Management.WebSites.IWebSiteOperations 參考。
webSpaceName
Type: System.String必要項。 網路空間的名稱。
webSiteName
Type: System.String必要項。 網站的名稱。
傳回值
Type: System.Threading.Tasks.Task<OperationResponse>
標準的服務回應,包括 HTTP 狀態碼和要求識別碼。
請參閱
WebSiteOperationsExtensions 類別
Microsoft.WindowsAzure 命名空間
回到頁首