System.Web.ClientServices.Providers 命名空间

包含客户端服务提供程序和其他类,它们支持在基于 Windows 的应用程序中访问 Microsoft Ajax 身份验证、角色和配置文件服务。 Contains client service providers and other classes that support access in Windows-based applications to the Microsoft Ajax authentication, roles, and profile services.

ClientFormsAuthenticationCredentials

表示使用客户端应用程序服务进行窗体身份验证的用户登录信息。Represents user login information for forms authentication by using client application services.

ClientFormsAuthenticationMembershipProvider

通过客户端应用程序服务实现窗体身份验证。Enables forms authentication with client application services.

ClientRoleProvider

从 Microsoft Ajax 角色服务中获取基于 Windows 的应用程序的角色信息。Gets role information for Windows-based applications from an Microsoft Ajax roles service.

ClientSettingsProvider

使基于 Windows 的应用程序可以从 Web 设置服务中检索用户设置。Enables Windows-based applications to retrieve user settings from a Web settings service.

ClientWindowsAuthenticationMembershipProvider

通过客户端应用程序服务实现 Windows 身份验证。Enables Windows authentication with client application services.

SettingsSavedEventArgs

SettingsSaved 事件提供数据。Provides data for the SettingsSaved event.

UserValidatedEventArgs

UserValidated 事件提供数据。Provides data for the UserValidated event.

接口

IClientFormsAuthenticationCredentialsProvider

定义 ClientFormsAuthenticationMembershipProvider 类为了检索用户凭据而调用的方法。Defines a method that the ClientFormsAuthenticationMembershipProvider class calls to retrieve user credentials.

注解

命名空间中的类 System.Web.ClientServices.Providers 包括客户端应用程序服务提供程序,这些提供程序使基于 Windows 的应用程序能够使用 Microsoft AjaxMicrosoft Ajax 身份验证、角色和配置文件服务。The classes in the System.Web.ClientServices.Providers namespace include client application service providers that enable Windows-based applications to use the Microsoft AjaxMicrosoft Ajax authentication, roles, and profile services. 可以在应用程序配置文件中启用这些服务并指定客户端服务提供程序,然后通过现有 .NET Framework 2.0.NET Framework 2.0 的成员资格、标识和应用程序设置基础结构访问服务。You can enable these services and specify client service providers in your application configuration file, and then access the services through existing .NET Framework 2.0.NET Framework 2.0 membership, identity, and application settings infrastructures. 当应用程序处于脱机状态时,客户端服务提供程序还支持通过在本地数据缓存中存储和检索用户信息来进行临时连接。The client service providers also support occasional connectivity by storing and retrieving user information in a local data cache when the application is offline. 有关详细信息,请参阅客户端应用程序服务For more information, see Client Application Services.

若要访问登录服务,可以使用 Windows 或 Forms 身份验证,方法是 ClientWindowsAuthenticationMembershipProvider ClientFormsAuthenticationMembershipProvider 在应用程序配置中指定或。To access the login service, you can use either Windows or Forms authentication by specifying the ClientWindowsAuthenticationMembershipProvider or ClientFormsAuthenticationMembershipProvider in your application configuration. Windows 身份验证使用用户登录到操作系统时提供的标识。Windows authentication uses the identity supplied when a user logs in to the operating system. Forms 身份验证要求您从用户检索登录信息,并将其传递给服务。Forms authentication requires that you to retrieve login information from the user and pass it to the service. 可以通过使用配置指定实现来实现此目的 IClientFormsAuthenticationCredentialsProvider ClientFormsAuthenticationMembershipProviderYou can do this by specifying an IClientFormsAuthenticationCredentialsProvider implementation with your ClientFormsAuthenticationMembershipProvider configuration. IClientFormsAuthenticationCredentialsProvider.GetCredentials方法返回 ClientFormsAuthenticationCredentials 对象,该对象包含用户登录信息。The IClientFormsAuthenticationCredentialsProvider.GetCredentials method returns a ClientFormsAuthenticationCredentials object that contains user login information. 例如,可以通过在方法中显示登录对话框来填充此对象 GetCredentialsYou can populate this object, for example, by displaying a login dialog box in the GetCredentials method.

若要访问角色和配置文件服务,请 ClientRoleProvider ClientSettingsProvider 在应用程序配置中指定和。To access the roles and profile services, specify the ClientRoleProvider and ClientSettingsProvider in your application configuration.