Hopefully this is the right place if not, please move to the correct location.
What I'm trying to do is add another column to be used in the membership provider when someone registers on the site. I want to be able to store a customer number along with the current data that is store. What is the best way to accomplish this using
MVC?
The current membership provide has username, email, password and etc...
switch to the simple mebership provider which was designed for this. otherwise you will need to write your own sql to create the column, and new methods that perform crud operation on the column.
Thanks, I read the article and notice that its for .net 4.5. I'm currently using VS 2010 with .net 4. Do I need to upgrade to 4.5 in order to get what is displayed in the article for MVC projects? Like the Filter that builds off the model in the Isimple membership
class?
Ok, then how do you set it up using the Internet MVC template? It looks like it builds the standard aspect membership tables when I run it? What code needs to be added for it to use simple membership?
I am building a MVC4 project but I don't see the seperate filters folder used for simple membership. The issue is I do not have a WebSecurity class at all. Not sure if I'm missing a reference package or not but I've updated all my references within Nuget.
Finally got it to work by adding the webmatrix reference. Also used the following articles to help me setup the simple membership.
MasterV23
Member
113 Points
318 Posts
Adding another column to store data using Membership Provider?
Jan 22, 2013 06:55 PM|LINK
Hopefully this is the right place if not, please move to the correct location.
What I'm trying to do is add another column to be used in the membership provider when someone registers on the site. I want to be able to store a customer number along with the current data that is store. What is the best way to accomplish this using MVC?
The current membership provide has username, email, password and etc...
bruce (sqlwo...
All-Star
36852 Points
5446 Posts
Re: Adding another column to store data using Membership Provider?
Jan 22, 2013 07:36 PM|LINK
switch to the simple mebership provider which was designed for this. otherwise you will need to write your own sql to create the column, and new methods that perform crud operation on the column.
MasterV23
Member
113 Points
318 Posts
Re: Adding another column to store data using Membership Provider?
Jan 22, 2013 07:40 PM|LINK
Are there any examples that you can link me to for the simple membershp provider?
MasterV23
Member
113 Points
318 Posts
Re: Adding another column to store data using Membership Provider?
Jan 22, 2013 10:50 PM|LINK
CPrakash82
All-Star
18288 Points
2843 Posts
Re: Adding another column to store data using Membership Provider?
Jan 22, 2013 11:05 PM|LINK
Follow here for simple membership provider
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
MasterV23
Member
113 Points
318 Posts
Re: Adding another column to store data using Membership Provider?
Jan 22, 2013 11:36 PM|LINK
CPrakash82
All-Star
18288 Points
2843 Posts
Re: Adding another column to store data using Membership Provider?
Jan 23, 2013 12:20 AM|LINK
MVC 4 is compatible with .NET 4.0 so you should be able to use it.
MasterV23
Member
113 Points
318 Posts
Re: Adding another column to store data using Membership Provider?
Jan 23, 2013 10:25 AM|LINK
CPrakash82
All-Star
18288 Points
2843 Posts
Re: Adding another column to store data using Membership Provider?
Jan 23, 2013 11:41 AM|LINK
Select MVC4.
MasterV23
Member
113 Points
318 Posts
Re: Adding another column to store data using Membership Provider?
Jan 23, 2013 12:34 PM|LINK
I am building a MVC4 project but I don't see the seperate filters folder used for simple membership. The issue is I do not have a WebSecurity class at all. Not sure if I'm missing a reference package or not but I've updated all my references within Nuget.
Finally got it to work by adding the webmatrix reference. Also used the following articles to help me setup the simple membership.
http://odetocode.com/blogs/scott/archive/2012/09/23/perils-of-the-mvc4-accountcontroller.aspx
Now the question is, is it possible to also use code first EF migration?