Thursday, August 21, 2008

Visual Studio is a remarkable tool making life easier for the developer in setting up membership and role management whioch is part of ASP.NET. However, Visual Studio assumes you are running SQL Server Express on your local machine. If, like a lot of developers you are using a remote hosting provider who separate their SQL and web hosting on different machines then you can't simple drop the MDF file into your remote web appliaction and except it to work.

This article doesn't provide a detailed method to enable role membership and personalisation services but simply shows you how you can set up a remote SQL Server to use these services.

To walk through this execise you will need the following information:

  • the name of the database
  • a username who as dbo rights to the database
  • the username's password
  • the name or IP address of the database you are connecting to, you may also need the SQL server port number 

Locate and run the executable aspnet_regsql.exe, this is normaly found under C:\Windows\Microsoft.NET\Framework\v2.0.50727

Screenshot 1

Assuming you want to create a new configuration rather than remove an existing one

Screenshot 2

Enter your database details. If your provider uses a non standard port make sure you enter the port number, in this case 1234.

Tip: Don't leave the drop drown list on 'default' instead type the name of your database.

Screenshot 3

 Screenshot 4

If successful you should see the following dialogue.

 Screenshot 5

Terms | SLA | Privacy
Copyright © WiSS Limited 2008
   Sign in   Normal   Larger   Largest
Tysca CMS rendered this page in 0 ms