This project is read-only.

Database Setup

1. Copy the Zip file

Copy the contents of the file into the directory specified as the Web Site Home Directory in step 1 of 2.1 Web Site Setup above.

2. Create an ASPNETDB Database

Create an ASPNETDB SQL Database via aspnetregsql (you can use a SQL Express database for this but you must set it up manually). The SQL Server Web Tools Beta uses the ASP.NET 2.0 Membership, Role and Profile providers to maintain users, permissions and state. The SqlProviders that are used by default use this database to maintain their info/tables. From the .NET 2.0 Command prompt run aspnetregsql; this will launch an application that will help you create this required database. Alternatively, you can use a SQL Express database to store this data, but creating that database is something that's got to be done outside the scope of this setup doc. Start -> All Programs -> Visual Studio 2005 -> Visual Studio Tools -> Visual Studio 2005 Command Prompt. Type aspnet_regsql.exe and hit return.


This will call up the ASP.NET SQL Server Setup Wizard. Follow the prompts in this tool.


Choose to Configure SQL Server for application services.


Enter your database server name and authentication type.


Confirm your settings


You have now created the provider database and completed the wizard steps. Press the Finish button to close the wizard.


Back at the Visual Studio 2005 Command Prompt, enter exit to close the prompt window.


3. Edit the web.config file

Uncomment (remove the <!-- before and the --> after) and alter the LocalSqlServer connection string in the web.config file (found in the Website directory created in step 1 of 2.1 Web Site Setup above) to point to the database created in step 2 directly above. Use the first string (highlighted below) if you are using a SQL Express database. Otherwise, use the second string.


4. Configure the Application Pool

Determine the application pool user name. For Windows XP, the application pool user is ASPNET. To determine your app pool user in Windows 2003, go back into IIS and click on the Home Directory tab. Make note of the Application pool value.


In IIS Services Manager, expand Application Pools, right-click on the identified application pool name, and choose Properties. For Windows XP you will not be able to configure the application to run in a separate Application Pool, skip ahead to Step 5.


On the Identity tab, make note of the selected Application pool identity.


5. Configure Database Security

Grant access as necessary to the database created in step 3 (e.g. make your application pool user a valid SQL user if using TRUSTED_CONNECTION=TRUE in the connection string). In Microsoft SQL Server Management Studio, drill down to the database, and under the Security node choose New User.


Enter the application pool user name and click on the button next to Login name.


Browse to find the desired account, and then grant SQL permissions to that accunt


NOTE: This is not a definitive guide on security for the ASPNET Provider database; please see the link at the bottom of this comment for that. Some basic information however is as follows.

The Database user (whether app pool or a SQL user account) that connects to the membership database needs the following roles:
  • aspnetMembershipFullAccess
  • aspnetRolesFullAccess
  • aspnetProfileFullAccess
  • aspnetPersonalizationFullAccess
  • aspnetWebEventFullAccess

If the AppPool uses a domain account rather than the default Network Service, be sure to add the domain account to the IIS_WPG local group on the web server
Alternatively, in a development environment a more sweeping role (such as dbo) may be utilized for the account, but this will not be using the principle of least privilege and is therefore most likely not a best practice.

More information can be obtained on the MSDN site that supports membership database permissions:

6. Run SSWT Installer

Browse to http://<path to your installation>/installer.aspx. This installer.aspx page will create the necessary application roles and a default admin user. The default admin user will have a user name of Admin and password of 1.admin.1. Note: after running this page successfully (you’ll receive the following confirmation screen), then the installer.aspx and installer.aspx.cs files can be deleted from the directory to prevent them from being run again.


Last edited Jun 28, 2006 at 5:01 PM by edlehman, version 2


No comments yet.