Hour20.Managing Your Site's Users


Building a website that supports user accounts is trivial with ASP.NET, thanks to ASP.NET's built-in user account support and login Web controls. When we configure the ASP.NET website to use forms-based authentication, the ASP.NET Website Administration Tool automatically adds a database to our project, ASPNETDB. This database contains the tables needed to store user accounts and roles. Additionally, the ASP.NET Website Administration Tool simplifies adding and managing users, roles, and access rights.

After this database has been created, a host of Web controls can be used that interact with the data. The CreateUserWizard control allows users to create new accounts, whereas the Login control logs a user on to the site. The LoginStatus control displays a Login or Logout link, depending on whether the user is logged in, while the more flexible LoginView control allows us to specify a more generic user interface for both authenticated and anonymous visitors. We also looked at the PasswordRecovery control, which can be used to recover a user's forgotten password. Prior to ASP.NET 2.0, creating a website that supported user accounts was anything but trivial. It involved creating the appropriate database tables from scratch and creating web pages that could handle creating accounts, managing accounts, and logging in and out of a site. However, with ASP.NET 2.0's new user account features and login Web controls, supporting user accounts can be done with a minimal amount of time and effort.

 Python   SQL   Java   php   Perl 
 game development   web development   internet   *nix   graphics   hardware 
 telecommunications   C++ 
 Flash   Active Directory   Windows