In the previous article we discussed how to create aspnetdb database using aspnet_regsql command. There is another method to create aspnetdb.mdf database file inside the App_Data folder that can be used by using the connection string having attachdbfilename datadirectory options. You can create and configure the auto named default aspnetdb database file by using the ASP.Net configuration option within the Visual Web Developer 2005 Express Edition or Visual Studio 2005.
First of all create a new ASP.Net web application using the Visual Web developer 2005 Express Edition. After creating a new web application you will get a default App_Data directory in solution explorer. This App_Data directory can be used to hold the different types of data providers such as xml file, xsd file or sql server mdf files. By default App_Data consists of no such file, you have to create the database files as per your requirements. Now steps for creating the Aspnetdb.mdf file in datadirectory i.e. App_Data.
Open the Website Menu and click ASP.Net Configuration. This will open a default ASP.Net Web Administration Tools web site. Before opening this default web administration tool ASP.Net 2.0 creates its default aspnetdb database inside the App_Data directory. ASP.Net Web Administration Tools provides the functionality to manage the security that includes users and role manager. You can also manage Application configuration settings like smtp settings to send mails, also you can configure the providers for your current ASP.Net web application.
Be the first to rate this post
Tags: asp.net 2.0, aspnetdb, sql server 2005, database, app_data, aspnet_regsql command
7/24/2008 5:23:09 PM