IClientChannel.DisplayInitializationUI 方法


用以获取凭据信息的用户接口的调用。A call to a user interface to obtain credential information.

 void DisplayInitializationUI();
public void DisplayInitializationUI ();
abstract member DisplayInitializationUI : unit -> unit
Public Sub DisplayInitializationUI ()


调用此方法以引发任意交互式通道初始化(例如,CardSpace 卡选择)。Call this method to cause any interactive channel initialization (for example, CardSpace card selection) to occur. 如果在没有显式调用 ICommunicationObject.Open 的情况下使用了通道,则将自动发生这种情况,因此对于许多应用程序此调用是可选项。This happens automatically if the channel is used without explicitly calling ICommunicationObject.Open, so for many applications this call is optional.

但是,如果用户在选择过程中花费了很长时间,则自动调用此操作的操作可能会超时。若要防止出现这种情况,请 DisplayInitializationUI 直接调用或 BeginDisplayInitializationUI EndDisplayInitializationUIHowever, if the user takes a long time in the selection process, the operation that automatically called this may time out. To prevent this, call DisplayInitializationUI or BeginDisplayInitializationUI and EndDisplayInitializationUI explicitly. 这些操作不会超时,而且还允许您控制此对话框在应用程序中出现的确切位置。These operations do not time out and allow you to control exactly where in your application this dialog comes up.

如果将应用程序配置为只显示一个对话框,此方法将只会打开一个对话框。This method only brings up a dialog if the application is configured to do so. 如果没有将应用程序配置为使用 CardSpace 或另一交互式通道初始值设定项,无需任何操作即可返回此调用。When the application is not configured to use CardSpace or another interactive channel initializer, this call returns without any action.

如果显式调用此方法,则还必须在使用它之前显式打开通道。If you call this method explicitly, you must also explicitly open the channel before using it.

有关详细信息,请参阅 使用 WCF 客户端访问服务System.ServiceModel.Dispatcher.IInteractiveChannelInitializerFor details, see Accessing Services Using a WCF Client and System.ServiceModel.Dispatcher.IInteractiveChannelInitializer.