How to create ASPNETDB database using aspnet_regsql tool?

What is ASPNETDB?

Microsoft has introduced a new and powerful default database schema in ASP.Net 2.0 as ASPNETDB.mdf database. This database file serves as a role provider, membership provider and web parts personalization handling with the help of BLOBs.

Visual Web Developer 2005 supports the ASP.Net configuration to manage this personal ASPNETDB database file within the web application inside the App_Data folder.


Uses of ASPNETDB database:

  1. ASPNETDB database helps in managing users along with their roles e.g. admin, employee, editors, etc.
  2. It also enables the in-built functionality of Login controls and web parts to be integrated on ASP.Net 2.0 web pages that helps in managing user profiles, login, and personalized user pages very easily even without writing the bulky code to implement the SQL queries or stored procedures along with data access code for inserting, updating or deleting the user personalized data.


How to use ASPNETDB database?

Firstly, you need to merge ASPNETDB with your own database. You can merge both databases using a tool called "aspnet_regsql". You can use aspnet_regsql command to create ASPNETDB database. This command executes the default scripts to create the default database for ASP.Net 2.0 web applications.


Steps to create ASPNETDB database using aspnet_regsql tool:

  1. Open the Visual Studio 2005 command prompt from Start -> All Programs -> Microsoft Visual Studio 2005 -> Visual Studio Tools -> Visual Studio 2005 Command Prompt
  2. Type aspnet_regsql and press enter key. This will open the ASP.Net SQL Server Setup Wizard. Click Next to continue
  3. In the next dialog box, select the option Configure SQL Server for application services. This option executes a script to configure the database for managing user profiles, roles, membership and personalization. Click Next to continue
  4. In this step enter the SQL server name and choose the right authentication method. Leave the database field to default and click Next
  5. Confirm your settings and click Next to finish

Once you merge both databases using above steps, you need to upload them on live server. For more information on aspnet_regsql tool you can refer to this URL ...

  • 25 Users Found This Useful

Was this answer helpful?


Related Articles

How to use ASP Email?

ASPEmail 5.0 is an active server component for sending e-mail messages using an external SMTP...

Sample script for CDO email

CDO (Collaboration Data Objects) is an inbuilt ASP component used to send emails via ASP. It is...

How to use ASP Simple Upload component?

Sample code: <% Option Explicit Dim upl, NewFileName Set upl =...

How to use Dundas Chart?

How to create a Basic Pie Chart with Dundas Chart To use this control in a web site, you will...

ASPJpeg support on Windows 2008 / 2012 servers

Yes, we have installed ASPJpeg component on Windows 2008 and Windows 2012 shared hosting servers....