search

Google
 

Tuesday, October 21, 2008

Creating Membership Tables

When you create a new ASP.NET 2.0 web site using Visual Studio 2005, you'll observe that a new folder App_Data gets created in the solution explorer, namely the aspnetdb.mdf file gets created. This extra database holds all the tables and stored procedures to let Membership, Roles, Profile etc run smoothly.

When the website is live and we want to use aspnetdb.mdf, we need to have an extra database webserver. Because of this reason we would like to have same database for tables and procedures of memebership and any other purpose that your site requires.

We have a possibility to have membership tables in a single database with the command
aspnet_regsql.exe.


We need to follow the below steps to install membership tables in your database with the command aspnet_regsql.exe.

Goto to the Visual Studio 2005 command Prompt.






MicrosoftSoft Visual Studio 2005->
Visual Studio Tools ->


Visual Studio 2005 Command prompt



Below is the command prompt window that gets opened and run the command aspnet_regsql.exe













Soon after you run the command, you will find the 'Welcome to the ASP.NET SQL server setup Wizard ' window opened.



Click next.



After clicking next 'Select a Setup Option' window gets opened.




Select the default or the other option depending upon the requirement.





Click next and note the 'Select the Server and Database' window gets opened.

Select the database and click next.



Note 'confirm your settings' window gets opened.


Confirm your settings and click next otherwise, go to previous window and change the settings.







Click next and note 'The database has been created or modified' window has been opened.


click finish.

Check the required tables are populated in the specified database.

No comments: