You can use client application services to validate a user through an existing ASP.NET AJAX authentication service. You can validate a user by using Windows or forms authentication. Windows authentication means that the user identity is the one supplied by the operating system when a user logs on to a computer or domain. You will typically use Windows authentication with an application deployed on a corporate intranet. Forms authentication means that you must include login controls in your application and pass the acquired credentials to the authentication provider. You will typically use forms authentication with an application deployed on the Internet.
To validate a user, you call the static Membership..::.ValidateUser method. This method accesses the client service provider configured for your application and returns a Boolean value indicating whether the user is valid. For more information, see How to: Implement User Login and Logout with Client Application Services.
When using Windows authentication, you must pass empty strings or null as the parameters of the ValidateUser method. When using Windows authentication, this method call will always return true.
With forms authentication, the ValidateUser method will return a value indicating whether the remote service has authenticated the user. If validation is successful, an authentication cookie is stored on the local hard disk. This cookie is used to confirm validation when accessing the roles and settings services.
When using forms authentication, you can pass a user name and password to the ValidateUser method. You can also pass empty strings or null as the parameters to use a credentials provider. A credentials provider is a class that you provide and specify in your application configuration. A credentials provider class must implement the IClientFormsAuthenticationCredentialsProvider interface, which has a single method named GetCredentials. Using a credentials provider enables you to share a single login dialog box among multiple applications. For more information, see How to: Configure Client Application Services.
When you configure your application to use a credentials provider with forms authentication, you must pass empty strings or null as the parameters of the ValidateUser method. The service provider will then call your IClientFormsAuthenticationCredentialsProvider..::.GetCredentials method implementation. Typically, you will implement this method to display a dialog box and return a populated ClientFormsAuthenticationCredentials object.
For more information about authentication, see ASP.NET Authentication. For information about how to set up the ASP.NET AJAX authentication service, see Using Forms Authentication with ASP.NET AJAX.