views:

358

answers:

3

i have a SQL server database on a server. I have just recently been playing around with asp.net mvc and i am using the membership login control. i see that it creates a default local database called aspnetdb.mdf with teh following tables:

aspnet_Applications
aspnet_membership
aspnet_paths
aspnet_profiles
aspnet_users
aspnet_usersinRoles
. . .
. . .

all in all its about 15 tables.

My question is i am trying to figure out if there is anyway to export these tables and upload them into my SQL Server database that is on the server.

any suggestions ?

A: 

You should backup the database and then restore it to the new server.

Keltex
i dont understand your comments. i am trying to take the tables from the local database and upload those into an existing sql server db
ooo
+2  A: 

Google the Database Publishing Wizard by microsoft.

It will script all your tables, procs and data that you can then import into your SQL Database.

griegs
A: 

I have recently performed the same thing and there are a few solutions that I have used:

Set up SQL Server as the SQL Membership Provider with the utility ASPNet_regsql.exe in C:\Windows\Microsoft.net\Framwork\2.0. There is a detailed video describing exactly what you need @ http://www.asp.net/learn/videos/video-148.aspx and a detailed article @ asp.net/learn/security/tutorial-04-cs.aspx -- I can only post one hyperlink.

Now the issue of you having built a huge app on the SQL express server. I would re-enter the users into sql server and away you go. If you start transferring the data, you need to make sure the applicationID is the same. This situation is described in the second link above.

If you are pushing these to a hosting site, you may also look into the "Database Publishing Service" a free download @ micosoft. The ins and outs are explained here: asp.net/learn/hosting/tutorial-07-cs.aspx.

wiglebot