Reputation: 898
We are making a student project, and have already made a database (SQL Server 2012) with a Customer
table, that has Id, Name, Address, Zip, Email
(also to be used as username) and Password
(not encrypted right now, and the 4 existing test users all have password = 1234
)
I'm trying to learn how to create a MVC4 project as a web app, and have altered the connection string in web.config
to connect to our database at my service provider. That also creates some tables that the MVC uses for user authorization.
Is it possible to link it up to our existing scenario, and have the users enter the values I need, and update the customer table in the database?
We are using Visual Studio 2012, and have a SQL Server hosted at a web hotel.
Upvotes: 1
Views: 2178
Reputation: 17540
I would not use the SimpleMembership to integrate with an existing database as discussed in this Q&A. As the name implies it is for a simple out-of-the-box security solution for MVC 4 applications and you can hit walls easily when trying to extend it. I would recommend creating a custom MembershipProvider as discussed here.
Upvotes: 0
Reputation: 6288
If you have .NET 4.5 available you can use the "SimpleMembership" which removes many disadvantages of the asp.net Membership Providers.
You can get information here: http://blog.osbornm.com/archive/2010/07/21/using-simplemembership-with-asp.net-webpages.aspx and here: http://weblogs.asp.net/jgalloway/archive/2012/08/29/simplemembership-membership-providers-universal-providers-and-the-new-asp-net-4-5-web-forms-and-asp-net-mvc-4-templates.aspx
The MVC4 Basic Internet Page Template already supports SimpleMembership so you can look into that.
Upvotes: 1