SimpleMembership is the default membership provider in ASP.NET MVC4. It supports a customized User table and OAuth.
Questions tagged [simplemembership]
596 questions
8
votes
2 answers
Role Provider / Membership? How to in asp.net web api?
I am building an asp.net mvc web api application and not sure how to do the membership stuff.
In my current project I have this
My own Users Table and Role Table I am not using asp.net membership as it brings too much baggage and does not fit how I…

chobo2
- 83,322
- 195
- 530
- 832
8
votes
2 answers
SimpleMembership - Add email to UserProfile - System.Data.SqlClient.SqlException: Invalid column name "Email" error
I'm fairly sure I have followed all the steps, but seem to have missed something. Using simplemembership in MVC4 app. Add Email to UserProfile table and in the Register and UserProfile models, added it to the Register method, but still getting the…

BattlFrog
- 3,370
- 8
- 56
- 86
8
votes
1 answer
MVC 4 SimpleMembership - Why WebSecurity.CurrentUserId -1 after login
I am trying to set a cookie upon login and having issues with getting the current user id after login. In the below, intUserId is -1 and WebSecurity.IsAuthenticated is false. Is this not the correct place to put this code? After this, it redirects…

crichavin
- 4,672
- 10
- 50
- 95
8
votes
2 answers
SimpleMembershipInitializer won't initialize
I am struggling with getting a simplemembership scenario working in my EntityFramework / MVC4 / DatabaseFirst project. I've found plenty of examples for working with code first, but nothing for DB first.
The problem I'm encountering is the the…

reidLinden
- 4,020
- 4
- 31
- 46
8
votes
1 answer
WebSecurity.CurrentUserName and User.Identity.Name are null after logging in
I'm stating to figure out SimpleMembership for my ASP.Net MVC 4 site. I've augmented UserProfile with a custom property, AccountTypeId. I've updated the database table with the augmented property and can save data to the database when registering.…

Tom Schreck
- 5,177
- 12
- 68
- 122
7
votes
1 answer
MVC4 SimpleMemberhip 'The Provider encountered an unknown error.'
I'm trying to use SimpleMembership with MVC4 using an SQL Azure database.
I get an exception
The Provider encountered an unknown error.
With no inner exception, on this line of code:
WebSecurity.CreateAccount("test@test.com", "23iu$9835",…

Kyle
- 32,731
- 39
- 134
- 184
7
votes
2 answers
MVC 4 authentication with Active Directory or Membership database
I´m building a web application which could get accessed in two ways. Everyone who is working in the same organisation as I can use our active directory to access the application.
Everyone from outside should join the application through a separate…

Jastol
- 165
- 3
- 12
7
votes
5 answers
ASP.NET MVC 4, The "WebSecurity.InitializeDatabaseConnection" method can be called only once
I am developing a code first web app in Visual Studio 2012 Express.
I use this connection string in the web.config:

niico
- 11,206
- 23
- 78
- 161
7
votes
1 answer
How to create simple membership sql tables manually?
I'm looking for a tool similar to Aspnet_regsql.exe for ASP .NET Membership just for simpleMemberShip Provider. Creating the tables at runtime is too late, cause a client program uses the same…

John Thompson
- 160
- 1
- 9
7
votes
3 answers
SimpleMembership in MVC4 app + WebApi using basic HTTP auth
I'm trying to implement an MVC4 web application with the following requirements:
(a) it offers its services to authenticated users only. As for authentication, I'd like to use simple membership, as it is the latest authentication technique from MVC,…

Naftis
- 4,393
- 7
- 63
- 91
7
votes
2 answers
Simplemembership ASPXAUTH cookie validating on two separate web projects
I am working on an ASP.NET MVC4 project using SimpleMembership, which generates an ASPXAUTH cookie when you are logged in. It seems to be working just fine, but then today I opened up another MVC4 project, only to notice that I was already logged…

Ron Penton
- 1,511
- 1
- 12
- 24
7
votes
3 answers
MVC 4 SimpleMembership HasLocalAccount method not found
When attempting to access /account/manage on the production server I get this error:
System.MissingMethodException: Method not found: 'Boolean WebMatrix.WebData.ExtendedMembershipProvider.HasLocalAccount(Int32)'.
at…

Eonasdan
- 7,563
- 8
- 55
- 82
6
votes
2 answers
How to make Single user login in MVC 4 applictaion
I am implementing an application where there is a mechanic for each machine in the company using the application. I'm trying to implement a user policy whereby if user is in a role "Mechanic" -- with username Machine1, and is logged in for that…

dlght
- 1,406
- 1
- 18
- 35
6
votes
1 answer
How to force the user to login to see any content using ASP.NET MVC 4
I am working on a 'ASP.NET MVC 4' application and use 'SimpleMembershipProvider'. The application will be used in intranet and there will be no content available for not authorized users so I want to force login before letting the user to the actual…

Leron
- 9,546
- 35
- 156
- 257
6
votes
2 answers
ASP.NET Identity external authentication provider custom icon
With SimpleMembership you can add an icon to the external authentication provider buttons like this:
SimpleMembership:
Dictionary FacebooksocialData = new Dictionary();
FacebooksocialData.Add("Icon",…

PussInBoots
- 11,028
- 9
- 52
- 84