简体   繁体   中英

How can I move account information from default ASPNETDB.mdf to my MyBase.sdf? ASP.Net MVC3?

I am developing asp.net MVC 3 application from the standart template, with included AccountController for registration and authorisation of users. As I understand from Where does the MVC3 default template store user-account information? - all account information is stored in ASPNETDB.mdf (using MsSQL Express)

At the same time I've made MyBase.sdf (SqlServerCe.4.0) for storing information about products, which are displayed on the pages of the project.

Now I want to store both account info and products info in one database(preferably SqlServerCe.4.0). I've tried to change connectionstring for the account db in web.config but it didn't work.

Is there any fast way to store all account and product info in MyBase? or the only way is to create a new Membership provider? ASPNET MVC3: Can i use my user/roles tables to handle user authentication?

You may want to look at a SQLCE Membership provider. A quick search on google revealed that one is available at codeplex . You may not have to write it from scratch. However, I would suggest you spend the time to understand the code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM