-
May 3rd, 2013, 04:45 PM
#1
Thread Starter
Fanatic Member
mvc 4 simplemembership questions with existing sql server database
I currently have an old classic asp (.asp) site that is using SQL Server (tables, stored procedures, views, etc..)
This has a 'Personnel' table that has ID, email, password, name, phone, role, etc.... which contains the information to authenticate and login.
I am in the process of moving it to .net and decided to try MVC 4. So I did the following in Visual Studio 2010:
ASP.NET MVC 4 Web Application using the Internet Application template and Razor.
The first thing I did after files had been created was change 'DefaultConnection' in web.config to use my sql server database.
Next, I opened Filters/InitializeSimpleMembershipAttriute.vb and changed the following line:
WebSecurity.InitializeDatabaseConnection("DefaultConnection", "Personnel", "ID", "Email", autoCreateTables:=True)
I then ran this locally and clicked on the register link which does the following:
-Created 4 tables: webpages_Membership, webpages_OAuthMembership, webpages_Roles, and webpages_UsersInRoles
On the registration page, I entered a new username and password. The result of this does the following:
-created a record in my already existing 'Personnel' table filling in data in columns 'Email' and 'ID' and all others are set as NULL.
-created a record in the 'webpages_Membership' table with the following columns populated: UserId, CreateDate, IsConfirmed, Password, PasswordChangedDate
A few questions I have based on this are:
1) Is there a way to get the existing passwords/user record info (created before I setup the 'Webpages_' tables) to be inserted into the webpages_Membership table? How do I use the same encoding as MVC 4 does?
2) webpages_Membership.PasswordSalt is not populated. Is there a way to turn this on?
3) What's the best way to populate the other 'Personnel' information currently being required in my old system?
Is there a good book/site/tutorial that helps someone new to MVC?
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|