I'm creating an AppHarbor MVC3 application and want to use the standard membership provider support. The AppHarbor guys told me I needed to create script for the table structure that I can run on my AppHarbor database. I'm not really familiar with databases, however. How do I go about creating and executing a script for the default membership tables?
Creating a script for ASP.NET membership table structure
5.9k views Asked by Wesley Tansey At
2
There are 2 answers
1
On
There is a great article here: http://www.nashcoding.com/2011/02/05/using-the-forms-authentication-membership-provider-on-appharbor/comment-page-1/#comment-477
1.Start a Visual Studio command prompt by going to Start -> All Programs -> Visual Studio 2010 -> Visual Studio Tools -> Visual Studio Command Prompt.
2.Run the following command, using the your AppHarbor database settings to fill in the values in brackets: aspnet_regsql.exe -S [Host] -d [Name] -U [Username] -P [Password] -A all
3.In your MVC project, open your Web.config file.
4.Replace the connectionString for ApplicationServices with the connection string found on your AppHarbor database page.
Use the command line aspnet_regsql.exe. See http://msdn.microsoft.com/en-us/library/ff648345.aspx. Excerpt:
Step 2. Install the Membership Database
Before you can use the SqlMembershipProvider, you must install the SQL Server membership database.
To install the membership database, log on to your server with an account that has authority to administrate SQL Server (such as the Administrator account). Open the Visual Studio 2005 command prompt, and run the following command: