Saturday 30 April 2011

How To Create ASPNET DB in Sql server 2008 And Move It From VS 2010

Using aspnet_regsql command:
Open the Visual Studio 2005 command prompt from Start --> All Programs --> Microsoft Visual Studio 2005 --> Visual Studio Tools --> Visual Studio 2005 Command Prompt



  1. type aspnet_regsql and press enter key
  2. This will open the ASP.Net SQL Server Setup wizard. Click next to continue…

 In the next screen select the option to 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…
 In this step enter the sql server name and choose the right authentication method. Leave the database field to default and click next…

 Confirm your settings and click next to finish.





IN Web.config:

 <connectionStrings>
    <remove name="LocalSqlServer"></remove>
    <add name="LocalSqlServer" connectionString="Data Source=SQLSERVER;Initial Catalog=DBNAME;User ID=ID;Password=PASS" providerName="System.Data.SqlClient"/></connectionStrings>


No comments:

Post a Comment