次の方法で共有


ICredentialBuilder.SpecifyCredentials メソッド

定義

資格情報を収集するためのダイアログ ボックスを表示します。

オーバーロード

SpecifyCredentials(IServiceProvider, String, String, String, Boolean, Boolean, String, String, String)

資格情報を収集するためのダイアログ ボックスを表示します。

SpecifyCredentials(IServiceProvider, String, String, String, Boolean, Boolean, String, String, String, EventHandler<CredentialInfoEventArgs>)

変更を保存するために指定されたイベント ハンドラー デリゲートを使用して、資格情報を収集するダイアログ ボックスを表示します。

SpecifyCredentials(IServiceProvider, String, String, String, Boolean, Boolean, String, String, String, EventHandler<CredentialInfoEventArgs>, EventHandler)

変更を保存してヘルプを表示するために、指定したイベント ハンドラー デリゲートを使用して、資格情報を収集するダイアログ ボックスを表示します。

SpecifyCredentials(IServiceProvider, String, String, String, Boolean, Boolean, String, String, String, EventHandler<CredentialInfoEventArgs>, EventHandler, Boolean)

変更を保存し、ダイアログ ボックス テキストのヘルプと指定した読み取り専用パラメーターを表示するために、指定したイベント ハンドラー デリゲートを使用して、資格情報を収集するダイアログ ボックスを表示します。

SpecifyCredentials(IServiceProvider, String, String, String, Boolean, Boolean, String, String, String)

資格情報を収集するためのダイアログ ボックスを表示します。

public:
 Microsoft::Web::Management::Client::CredentialInfo ^ SpecifyCredentials(IServiceProvider ^ serviceProvider, System::String ^ dialogTitleText, System::String ^ userName, System::String ^ password, bool isModify, bool verifyValidWindowsUserPassword, System::String ^ description, System::String ^ setSpecificCredentialsText, System::String ^ otherOptionText);
public Microsoft.Web.Management.Client.CredentialInfo SpecifyCredentials (IServiceProvider serviceProvider, string dialogTitleText, string userName, string password, bool isModify, bool verifyValidWindowsUserPassword, string description, string setSpecificCredentialsText, string otherOptionText);
abstract member SpecifyCredentials : IServiceProvider * string * string * string * bool * bool * string * string * string -> Microsoft.Web.Management.Client.CredentialInfo
Public Function SpecifyCredentials (serviceProvider As IServiceProvider, dialogTitleText As String, userName As String, password As String, isModify As Boolean, verifyValidWindowsUserPassword As Boolean, description As String, setSpecificCredentialsText As String, otherOptionText As String) As CredentialInfo

パラメーター

serviceProvider
IServiceProvider

IServiceProviderユーザー資格情報を収集するためのサービス プロバイダーを表すインターフェイス。

dialogTitleText
String

ダイアログ ボックスのタイトル。

userName
String

ユーザー名です。

password
String

ユーザー パスワード。

isModify
Boolean

このパラメーターは将来使用するために予約されています。

verifyValidWindowsUserPassword
Boolean

true Windows でパスワードを確認する必要がある場合は 。それ以外の場合は false

description
String

ユーザーの説明。

setSpecificCredentialsText
String

特定のユーザー。

otherOptionText
String

代替ユーザー。

戻り値

CredentialInfoこのオーバーロードのパラメーターを使用して作成される オブジェクト。

次の例では、このメソッドを実装します。

public CredentialInfo SetCredentials(IServiceProvider serviceProvider,
bool verifyPW) {
    return this.SetCredentials(serviceProvider,
        verifyPW, null);
}

public CredentialInfo SetCredentials(IServiceProvider serviceProvider,
    bool verifyPW, EventHandler showHelp) {
    if (serviceProvider == null) {
        throw new ArgumentNullException("serviceProvider");
    }

    IManagementUIService uiService = (IManagementUIService)serviceProvider.
        GetService(typeof(IManagementUIService));
    Debug.Assert(uiService != null);

    CredentialInfo credentials = null;

    using (SetCredoDlg dialog =
        new SetCredoDlg(serviceProvider, showHelp)) {
        dialog.VerifyValidWindowsUserPassword = verifyPW;

        if (uiService.ShowDialog(dialog) == DialogResult.OK) {
            credentials = new CredentialInfo();
            credentials.UserName = dialog.UserName;
            credentials.Password = dialog.Password;
        }
    }

    return credentials;
} 

注釈

パラメーターが または 空の userName 場合、IIS は null パススルー認証を使用します。

適用対象

SpecifyCredentials(IServiceProvider, String, String, String, Boolean, Boolean, String, String, String, EventHandler<CredentialInfoEventArgs>)

変更を保存するために指定されたイベント ハンドラー デリゲートを使用して、資格情報を収集するダイアログ ボックスを表示します。

public:
 Microsoft::Web::Management::Client::CredentialInfo ^ SpecifyCredentials(IServiceProvider ^ serviceProvider, System::String ^ dialogTitleText, System::String ^ userName, System::String ^ password, bool isModify, bool verifyValidWindowsUserPassword, System::String ^ description, System::String ^ setSpecificCredentialsText, System::String ^ otherOptionText, EventHandler<Microsoft::Web::Management::Client::CredentialInfoEventArgs ^> ^ commitHandler);
public Microsoft.Web.Management.Client.CredentialInfo SpecifyCredentials (IServiceProvider serviceProvider, string dialogTitleText, string userName, string password, bool isModify, bool verifyValidWindowsUserPassword, string description, string setSpecificCredentialsText, string otherOptionText, EventHandler<Microsoft.Web.Management.Client.CredentialInfoEventArgs> commitHandler);
abstract member SpecifyCredentials : IServiceProvider * string * string * string * bool * bool * string * string * string * EventHandler<Microsoft.Web.Management.Client.CredentialInfoEventArgs> -> Microsoft.Web.Management.Client.CredentialInfo
Public Function SpecifyCredentials (serviceProvider As IServiceProvider, dialogTitleText As String, userName As String, password As String, isModify As Boolean, verifyValidWindowsUserPassword As Boolean, description As String, setSpecificCredentialsText As String, otherOptionText As String, commitHandler As EventHandler(Of CredentialInfoEventArgs)) As CredentialInfo

パラメーター

serviceProvider
IServiceProvider

IServiceProviderユーザー資格情報を収集するためのサービス プロバイダーを表すインターフェイス。

dialogTitleText
String

ダイアログ ボックスのタイトル。

userName
String

ユーザー名です。

password
String

ユーザー パスワード。

isModify
Boolean

このパラメーターは将来使用するために予約されています。

verifyValidWindowsUserPassword
Boolean

true Windows でパスワードを確認する必要がある場合は 。それ以外の場合は false

description
String

ユーザーの説明。

setSpecificCredentialsText
String

特定のユーザー。

otherOptionText
String

代替ユーザー。

commitHandler
EventHandler<CredentialInfoEventArgs>

変更の保存に使用されるイベント ハンドラー デリゲート。

戻り値

CredentialInfoこのオーバーロードのパラメーターを使用して作成される オブジェクト。

次の例では、このメソッドを実装します。

public CredentialInfo SetCredentials(IServiceProvider serviceProvider,
bool verifyPW) {
    return this.SetCredentials(serviceProvider,
        verifyPW, null);
}

public CredentialInfo SetCredentials(IServiceProvider serviceProvider,
    bool verifyPW, EventHandler showHelp) {
    if (serviceProvider == null) {
        throw new ArgumentNullException("serviceProvider");
    }

    IManagementUIService uiService = (IManagementUIService)serviceProvider.
        GetService(typeof(IManagementUIService));
    Debug.Assert(uiService != null);

    CredentialInfo credentials = null;

    using (SetCredoDlg dialog =
        new SetCredoDlg(serviceProvider, showHelp)) {
        dialog.VerifyValidWindowsUserPassword = verifyPW;

        if (uiService.ShowDialog(dialog) == DialogResult.OK) {
            credentials = new CredentialInfo();
            credentials.UserName = dialog.UserName;
            credentials.Password = dialog.Password;
        }
    }

    return credentials;
} 

注釈

パラメーターが または 空の userName 場合、IIS は null パススルー認証を使用します。

適用対象

SpecifyCredentials(IServiceProvider, String, String, String, Boolean, Boolean, String, String, String, EventHandler<CredentialInfoEventArgs>, EventHandler)

変更を保存してヘルプを表示するために、指定したイベント ハンドラー デリゲートを使用して、資格情報を収集するダイアログ ボックスを表示します。

public:
 Microsoft::Web::Management::Client::CredentialInfo ^ SpecifyCredentials(IServiceProvider ^ serviceProvider, System::String ^ dialogTitleText, System::String ^ userName, System::String ^ password, bool isModify, bool verifyValidWindowsUserPassword, System::String ^ description, System::String ^ setSpecificCredentialsText, System::String ^ otherOptionText, EventHandler<Microsoft::Web::Management::Client::CredentialInfoEventArgs ^> ^ commitHandler, EventHandler ^ showHelp);
public Microsoft.Web.Management.Client.CredentialInfo SpecifyCredentials (IServiceProvider serviceProvider, string dialogTitleText, string userName, string password, bool isModify, bool verifyValidWindowsUserPassword, string description, string setSpecificCredentialsText, string otherOptionText, EventHandler<Microsoft.Web.Management.Client.CredentialInfoEventArgs> commitHandler, EventHandler showHelp);
abstract member SpecifyCredentials : IServiceProvider * string * string * string * bool * bool * string * string * string * EventHandler<Microsoft.Web.Management.Client.CredentialInfoEventArgs> * EventHandler -> Microsoft.Web.Management.Client.CredentialInfo
Public Function SpecifyCredentials (serviceProvider As IServiceProvider, dialogTitleText As String, userName As String, password As String, isModify As Boolean, verifyValidWindowsUserPassword As Boolean, description As String, setSpecificCredentialsText As String, otherOptionText As String, commitHandler As EventHandler(Of CredentialInfoEventArgs), showHelp As EventHandler) As CredentialInfo

パラメーター

serviceProvider
IServiceProvider

IServiceProviderユーザー資格情報を収集するためのサービス プロバイダーを表すインターフェイス。

dialogTitleText
String

ダイアログ ボックスのタイトル。

userName
String

ユーザー名です。

password
String

ユーザー パスワード。

isModify
Boolean

このパラメーターは将来使用するために予約されています。

verifyValidWindowsUserPassword
Boolean

true Windows でパスワードを確認する必要がある場合は 。それ以外の場合は false

description
String

ユーザーの説明。

setSpecificCredentialsText
String

特定のユーザー。

otherOptionText
String

代替ユーザー。

commitHandler
EventHandler<CredentialInfoEventArgs>

変更の保存に使用されるイベント ハンドラー デリゲート。

showHelp
EventHandler

ヘルプの表示に使用されるイベント ハンドラー デリゲート。

戻り値

CredentialInfoこのオーバーロードのパラメーターを使用して作成される オブジェクト。

次の例では、このメソッドを実装します。

public CredentialInfo SetCredentials(IServiceProvider serviceProvider,
bool verifyPW) {
    return this.SetCredentials(serviceProvider,
        verifyPW, null);
}

public CredentialInfo SetCredentials(IServiceProvider serviceProvider,
    bool verifyPW, EventHandler showHelp) {
    if (serviceProvider == null) {
        throw new ArgumentNullException("serviceProvider");
    }

    IManagementUIService uiService = (IManagementUIService)serviceProvider.
        GetService(typeof(IManagementUIService));
    Debug.Assert(uiService != null);

    CredentialInfo credentials = null;

    using (SetCredoDlg dialog =
        new SetCredoDlg(serviceProvider, showHelp)) {
        dialog.VerifyValidWindowsUserPassword = verifyPW;

        if (uiService.ShowDialog(dialog) == DialogResult.OK) {
            credentials = new CredentialInfo();
            credentials.UserName = dialog.UserName;
            credentials.Password = dialog.Password;
        }
    }

    return credentials;
} 

注釈

パラメーターが または 空の userName 場合、IIS は null パススルー認証を使用します。

適用対象

SpecifyCredentials(IServiceProvider, String, String, String, Boolean, Boolean, String, String, String, EventHandler<CredentialInfoEventArgs>, EventHandler, Boolean)

変更を保存し、ダイアログ ボックス テキストのヘルプと指定した読み取り専用パラメーターを表示するために、指定したイベント ハンドラー デリゲートを使用して、資格情報を収集するダイアログ ボックスを表示します。

public:
 Microsoft::Web::Management::Client::CredentialInfo ^ SpecifyCredentials(IServiceProvider ^ serviceProvider, System::String ^ dialogTitleText, System::String ^ userName, System::String ^ password, bool isModify, bool verifyValidWindowsUserPassword, System::String ^ description, System::String ^ setSpecificCredentialsText, System::String ^ otherOptionText, EventHandler<Microsoft::Web::Management::Client::CredentialInfoEventArgs ^> ^ commitHandler, EventHandler ^ showHelp, bool readOnly);
public Microsoft.Web.Management.Client.CredentialInfo SpecifyCredentials (IServiceProvider serviceProvider, string dialogTitleText, string userName, string password, bool isModify, bool verifyValidWindowsUserPassword, string description, string setSpecificCredentialsText, string otherOptionText, EventHandler<Microsoft.Web.Management.Client.CredentialInfoEventArgs> commitHandler, EventHandler showHelp, bool readOnly);
abstract member SpecifyCredentials : IServiceProvider * string * string * string * bool * bool * string * string * string * EventHandler<Microsoft.Web.Management.Client.CredentialInfoEventArgs> * EventHandler * bool -> Microsoft.Web.Management.Client.CredentialInfo
Public Function SpecifyCredentials (serviceProvider As IServiceProvider, dialogTitleText As String, userName As String, password As String, isModify As Boolean, verifyValidWindowsUserPassword As Boolean, description As String, setSpecificCredentialsText As String, otherOptionText As String, commitHandler As EventHandler(Of CredentialInfoEventArgs), showHelp As EventHandler, readOnly As Boolean) As CredentialInfo

パラメーター

serviceProvider
IServiceProvider

IServiceProviderユーザー資格情報を収集するためのサービス プロバイダーを表すインターフェイス。

dialogTitleText
String

ダイアログ ボックスのタイトル。

userName
String

ユーザー名です。

password
String

ユーザー パスワード。

isModify
Boolean

このパラメーターは将来使用するために予約されています。

verifyValidWindowsUserPassword
Boolean

true Windows でパスワードを確認する必要がある場合は 。それ以外の場合は false

description
String

ユーザーの説明。

setSpecificCredentialsText
String

特定のユーザー。

otherOptionText
String

代替ユーザー。

commitHandler
EventHandler<CredentialInfoEventArgs>

変更の保存に使用されるイベント ハンドラー デリゲート。

showHelp
EventHandler

ヘルプの表示に使用されるイベント ハンドラー デリゲート。

readOnly
Boolean

true ダイアログ ボックスのテキスト ボックスが読み取り専用の場合は 。 false テキスト ボックスが読み取り/書き込みである場合は 。

戻り値

CredentialInfoこのオーバーロードのパラメーターを使用して作成される オブジェクト。

次の例では、このメソッドを実装します。

public CredentialInfo SetCredentials(IServiceProvider serviceProvider,
bool verifyPW) {
    return this.SetCredentials(serviceProvider,
        verifyPW, null);
}

public CredentialInfo SetCredentials(IServiceProvider serviceProvider,
    bool verifyPW, EventHandler showHelp) {
    if (serviceProvider == null) {
        throw new ArgumentNullException("serviceProvider");
    }

    IManagementUIService uiService = (IManagementUIService)serviceProvider.
        GetService(typeof(IManagementUIService));
    Debug.Assert(uiService != null);

    CredentialInfo credentials = null;

    using (SetCredoDlg dialog =
        new SetCredoDlg(serviceProvider, showHelp)) {
        dialog.VerifyValidWindowsUserPassword = verifyPW;

        if (uiService.ShowDialog(dialog) == DialogResult.OK) {
            credentials = new CredentialInfo();
            credentials.UserName = dialog.UserName;
            credentials.Password = dialog.Password;
        }
    }

    return credentials;
} 

注釈

パラメーターが または 空の userName 場合、IIS は null パススルー認証を使用します。 パラメーターが の readOnly 場合、ユーザーは falseテキスト ボックス内のテキストを変更できます。

適用対象