i want to ask about ASP.Net Configuration. i have a project that use ASP.Net MVC3. and i use membership in my project. in my database server, there’s 2 database for my project.
- aspnetdb, contains aspnet_membership, aspnet_user, aspnet_roles, etc (i use asp.net Configuration)
- mydatabase, its for my project database.
now my boss told me that he want to host my project in public and told me to use only one database. so i have to move aspnetdb to mydatabase. how can i do it without making new table in mydatabase ?
thanks
By default the ASP.NET membership provider uses a built-in connectionString named
LocalSqlServerwhich is something like this:and when you use the
Membershipfor first time (or when you use the web configuration manager tool), theaspnetdb.mdfwill be created automatically. For first step, you can remove thisconnectionStringfromweb.configbyclearcommand:and also, you must change the
connectionStringformembershipProvider(and alsoroleProviderif you use it) inweb.configfile:For configure the database to use ASP.NET built-in membership provider, you can use regsql tool
which can be founded here:
In this folder, find the
aspnet_regsql.exefile and run it. A helpful wizard will be shown andhelp you step by step to configure new database. And about your final issue: You haven’t to apply any change
to your
edmxfile! The EF works with tables you supplied to it, andmembershipProviderdo its job withtables that ASP.NET supplied to it! Well done, Good job!