Search code examples
asp.net-mvc-2aspnetdb

Combining tables from business db and ASPNETDB.MDF in stock asp.net mvc app


ASP.Net MVC apps have a business database FOO.MDF and a seperate accounting database ASPNETDB.MDF if they use the stock account provider

Is it possible to move the tables from ASPNETDB.MDF into my business db (I want to refer the user class in other tables) while still using the off-the-shelf AspNetSqlMembershipProvider? I don't want to write my own provider if I can avoid it at all.

What happens if I add some fields to the aspnet_Users table which are set insite AccountController?

Thanks, Duffy


Solution

  • I ended up creating the aspnetdb tables inside my business db with the script described here.

    http://weblogs.asp.net/scottgu/archive/2005/08/25/423703.aspx

    However, I didn't dare to add custom fields to the aspnet tables. Instead I created a user table where each entry is matched with exactly one entry from the "official" aspnet_user table and extended the signup procedure to generate a user object once the aspnet_user object was established.