Friday, October 17, 2008

Using Forms Authentication with ASP.NET AJAX

Using Forms Authentication with ASP.NET AJAX:
You can use the Microsoft AJAX Library application authentication service to verify credentials that are stored as part of the ASP.NET membership service.
This topic shows how to call the application authentication service from the browser by using JavaScript.
You can access the authentication service from client script by using the
AuthenticationService class, which supports the following methods:
login. This method validates the user credentials by using the default membership provider. If the credentials are verified, the method sends a forms authentication cookie to the browser. Most ASP.NET AJAX applications will use the login method, because forms-authenticated applications require an authentication cookie in the browser.
logout. This method clears the forms authentication cookie.
Configuring the Server:
The server provides the infrastructure to process the identification credentials such as name and password from a user, and to validate those credentials. The forms authentication feature in ASP.NET enables you to authenticate the user's login name and password users by using a login form. If the application authenticates the request, the server issues a ticket that contains a key for reestablishing the user identity in subsequent requests.
The AuthenticationService class provides the JavaScript proxy class that you call from client script to communicate with the authentication service on the server.

See more details: