SimpleMembership is the default membership provider in ASP.NET MVC4. It supports a customized User table and OAuth.
Questions tagged [simplemembership]
596 questions
5
votes
2 answers
How do I manually "log a user in" using WebSecurity + SimpleMembership?
I'd like to use WebSecurity+SimpleMembership, but implement the ability to (optionally) login users via a custom/alternative authentication method.
WebSecurity.Login only has one method signature, which requires both a username and a password. I'd…

Seth
- 2,712
- 3
- 25
- 41
5
votes
1 answer
Roles.IsUserInRole() not working in WCF using wsHttpBinding and MVC 4
I have the following test setup, all working:
-WCF Application running a MathService.svc, setup to use SimpleMembershipProvider
-MVC 4 Internet App using the default SimpleMembershipProvider
-Membership is:
3 Roles: 'Debug', 'Administrator' and…

Andreas
- 681
- 1
- 8
- 16
5
votes
3 answers
Partial binding information was supplied for an assembly mstest
I am using the new SimpleMembership framework in .Net.
The unit tests to create users (using the API - see below) work fine locally in Visual Studio 2012 IDE.
WebSecurity.CreateUserAndAccount(entity.UserName, entity.Password, new { });
However,…

user1697278
- 61
- 1
- 1
- 3
4
votes
2 answers
Foreign key issue when adding user to role with SimpleMembership (MySQL)
I'm trying to use SimpleMembership with MySQL in a Code First project. This is the initializer I made:
WebSecurity.InitializeDatabaseConnection("MyConnectionStringName", "UserProfile", "UserId", "UserName", false);
if…

Jens
- 129
- 1
- 7
4
votes
1 answer
How to migrate from SimpleMembership to ASP.NET.Identity
Migrating from MVC4 to MVC5 and want to use ASP.NET Identity too but I am struggling to find anything that covers everything I think I need to do to migrate the Identity. Migrating an Existing Website from SimpleMembership to ASP.NET Identity…

Colin
- 22,328
- 17
- 103
- 197
4
votes
0 answers
Joint WebSecurity.CreateUser and DbContext operations escalate to DTC
Recently I ran into a glitch, while trying to wrap up some operations involing both WebSecurity and DbContext with a transaction.
In my Asp.net MVC 4 app, I'm trying to register a new user this way:
var transactionOptions = new…

tomalone
- 404
- 3
- 12
4
votes
1 answer
Validating user in SimpleMembership
What is the alternative to Membership.ValidateUser() in SimpleMembership? I use WebSecurity.Login to validate the current user, but I have a situation where a user has to enter their password again to change some user settings. Should I just use…

Mike Cole
- 14,474
- 28
- 114
- 194
4
votes
2 answers
MVC Code First: One-to-many relationship between own model and SimpleMembership user
I am currently working on an event calendar website and I am still a novice when it comes to ASP.NET. I am using the MVC4 Framework, as well as the EntityFramework (CodeFirst) and the SimpleMembershipProvider, which comes with the MVC4 template. I…

sfey
- 97
- 2
- 8
4
votes
1 answer
Application Architecture- Administrator Registration & Management
Don't know if this is an appropriate questions. However, here it goes.
I am currently work on a project for a client, ASP.net 4.5 MVC4 razor. It's basically a web store for their customers who register an account and order products from their…

bigjfunk
- 57
- 4
4
votes
1 answer
How to redirect user not in proper role to Not Permitted?
While using SimpleMembershipProvider in MVC 4 project, when user without proper role runs action, he's redirected to Account/Login. How can I redirect user to my own "Not enough permissions to view the page" action?

mrówa
- 5,671
- 3
- 27
- 39
4
votes
2 answers
How do I configure what happens when using Authorize(Roles) attribute?
I have an MVC4 project with simplemembership configured. It's all working etc. but I would like to know how to tell it wich controller/action to redirect to when a user is not authorized to view a given page.
For example, if I use…

Hades
- 1,975
- 1
- 23
- 39
4
votes
2 answers
Simplemembership - adding email field and use as login-name
I am trying to do two things here:
1. Adding an email field to the (default)UserProfile table.
Works like a charm.
Users can register both a username and email.
2. Change the login to use the email instead of username, this does also works like a…

Josef
- 585
- 1
- 7
- 19
4
votes
2 answers
Azure Mobile Services vs MVC4 SimpleMembership
When using an ASP.Net MVC4 site, it's very easy to add OAuth authentication with SimpleMembership.
OAuthWebSecurity.RegisterTwitterClient(consumerKey,consumerSecret);
When using Azure Mobile Services on a client device, it's very easy to add OAuth…

Rob Gibbens
- 1,122
- 1
- 8
- 24
4
votes
1 answer
SimpleMembership with WebForms
Is it possible to use SimpleMembership with ASP.NET WebForms?
John Galloway's article seems to indicate that WebForms "implements OAuth on top of ASP.NET Membership".
All the other articles I've found (on StackOverflow & elsewhere) discuss…

Sean
- 14,359
- 13
- 74
- 124
4
votes
2 answers
You must call "WebSecurity.InitializeDatabaseConnection" ... But I already have
I've read through a number of SO questions on this topic, but all seem to be dealing with where you should put this call.
My problem is different: I have already done the WebSecurity.InitializeDatabaseConnection() call, and have set breakpoints so I…

Dave Hanna
- 2,491
- 3
- 32
- 52