System.Web.ClientServices.Providers 命名空間

包含客戶端服務提供者及其他類別,支援在 Windows 應用程式中存取 Microsoft Ajax 的認證、角色及設定檔服務。

類別

名稱 Description
ClientFormsAuthenticationCredentials

透過用戶端應用程式服務表示表單驗證的使用者登入資訊。

ClientFormsAuthenticationMembershipProvider

使用用戶端應用程式服務啟用窗體驗證。

ClientRoleProvider

從 Microsoft Ajax 角色服務取得 Windows 應用程式的角色資訊。

ClientSettingsProvider

啟用 Windows 應用程式從網頁設定服務擷取使用者設定。

ClientWindowsAuthenticationMembershipProvider

使用用戶端應用程式服務啟用 Windows 驗證。

SettingsSavedEventArgs

提供 SettingsSaved 事件的資料。

UserValidatedEventArgs

提供 UserValidated 事件的資料。

介面

名稱 Description
IClientFormsAuthenticationCredentialsProvider

定義了一個類別呼叫 ClientFormsAuthenticationMembershipProvider 用來取得使用者憑證的方法。

備註

System.Web.ClientServices.Providers 命名空間中的類別包含客戶端應用程式服務提供者,使基於Windows的應用程式能使用 Microsoft Ajax 認證、角色及設定檔服務。 你可以啟用這些服務,並在應用程式設定檔中指定客戶端服務提供者,然後透過現有的 .NET 成員、身份及應用程式設定基礎架構存取服務。 客戶端服務提供者也透過在應用程式離線時,將使用者資訊儲存並檢索於本地資料快取中,來支援偶爾的連線。 欲了解更多資訊,請參閱 客戶應用服務。

要存取登入服務,你可以在應用程式設定中指定 ClientWindowsAuthenticationMembershipProvider 或 ClientFormsAuthenticationMembershipProvider,使用 Windows 或表單認證。 Windows 驗證 使用使用者登入作業系統時提供的身份。 表單認證需要你從使用者那裡取得登入資訊並交給服務。 你可以透過設定一個 IClientFormsAuthenticationCredentialsProvider 實 ClientFormsAuthenticationMembershipProvider 作來達成。 此方法會 IClientFormsAuthenticationCredentialsProvider.GetCredentials 回傳 ClientFormsAuthenticationCredentials 一個包含使用者登入資訊的物件。 例如,你可以在方法中 GetCredentials 顯示登入對話框來填充這個物件。

要存取角色與設定檔服務,請在你的應用程式設定中指定 and ClientRoleProviderClientSettingsProvider 。