O'Reilly logo

ASP.NET 2.0: A Developer's Notebook by Wei-Meng Lee

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Add Users with WAT

Once you have set up your site to authenticate users, you need a way to add user accounts to your site. In ASP.NET 2.0, you can do this by using the ASP.NET Web Site Administration Tool (WAT). The user accounts you add will be stored in a SQL Server 2005 Express database by default (located under the App_Data folder in your project), as specified by the default Membership Provider. There is no longer any need for you to create your own custom databases for this purpose or to store the user account information in Web.config (which is insecure).

Note

The ASP.NET Web Application Administration Tool (WAT) will help you create new users for your web site and then store the users' information in the database.

How do I do that?

In this lab, you will use the ASP.NET WAT to add new user accounts to your web application. The user accounts will be stored in the database specified by the Membership Provider (see the Section 5.1.2 of Section 5.1). By default, the WAT adds new users to a SQL 2005 Express database.

  1. Open the project created in the last lab (C:\ASPNET20\chap-5-SecurityControls).

  2. To add a new user to your web site, you will use the ASP.NET Web Site Administration Tool (found in the Website ASP.NET Configuration menu item; see Figure 5-9).

    Launching the ASP.NET Configuration tool

    Figure 5-9. Launching the ASP.NET Configuration tool

  3. Alternatively, you can invoke the ASP.NET WAT by clicking on the ASP.NET Configuration ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required