transfer only one database to the production machine, rather than having to
migrate two separate databases.
In order to use your database to store membership data, you need to complete
two tasks:
❑
Create the necessary data structures in Dorknozzle.
❑
Edit Web.config to specify the new location of these structures, overriding
the default configuration that uses the ASPNETDB database.
You can use a tool that ships with ASP.NET 2.0, aspnet_regsql.exe, to custom-
ize the data store and add the necessary structures to your own database. This
tool can be executed at the Windows command prompt, where you can include
various parameters to instantly configure it for your database; alternatively, it
can be run in Wizard mode, allowing you to set those options one at a time. To
execute the tool, first open a SDK Command Prompt window from the Start menu
(Start > All Programs > Microsoft .NET Framework SDK 2.0 > SDK Command
Prompt). At the command prompt, type aspnet_regsql.exe and hit Enter.
The wizard should open with a Welcome screen, where you’ll just need to click
Next. In the next window, which is shown in Figure 13.6, you can choose between
adding the data structures to an existing database (or to a new database that can
be created for you), or removing the data structures.
Leave the first option selected and hit Next—you’ll see the dialog shown in Fig-
ure 13.7. Here, you’ll need to tell the wizard which server and database you want
to connect to in order to create those structures. The Server should be LOCAL\Sql-
Express (where LOCAL is the network name of your current machine), and the
Database should be Dorknozzle.
Using Remote Servers
You can enter any local or remote server into the Server field. You might
use this tool to configure a remote server, for example, when choosing to
move the application from your development machine to a remote production
machine. In that case, you’d need to select SQL Server Authentication and
supply the username and password provided by the server’s administrator.
548
Chapter 13: Security and User Authentication