Questions tagged [simplemembership]

SimpleMembership is the default membership provider in ASP.NET MVC4. It supports a customized User table and OAuth.

596 questions
6
votes
4 answers

How would I mimic User.IsInRole()

I have a website thats build with VS 2012 Internet Application ( Simple membership) EF Code First Updates I would like to know how to extend HttpContext.User.IsInRole(role) 's functionality for a custom table -> User.IsInClient(client).
Don Thomas Boyle
  • 3,055
  • 3
  • 32
  • 54
6
votes
2 answers

Asp mvc 4 Membership and WebSecurity

I need a suggestion about what to do. I'm currently using WebSecurity methods to do all the account related job. However it does not support E-mail uniqueness verification so I have a few options: Write (subclass) a new SimpleMembershipProvider…
6
votes
4 answers

WebSecurity.GeneratePasswordResetToken returns error (but user exists!)

I'm working in an ASP.NET MVC 4 web app, I'm trying to make a password forget page. In my POST, I check that the user related to the password is present WebSecurity.UserExists(email) and it returns true, but when I…
Davide
  • 1,305
  • 3
  • 16
  • 36
6
votes
1 answer

Simplemembership implementing anonymous users method

Jon Galloway has an overview - 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 - of the new membership features in…
s_h
  • 1,476
  • 2
  • 27
  • 61
6
votes
6 answers

.NET MVC4 SimpleMembership Error - "No user found was found that has the name xxx"

I am using SimpleMembership in my .NET MVC4 project. During development, while manually manipulating/rebuilding the database, I've come across an error that would be unlikely in production, but I want to solve this and I cannot find a graceful way…
Gadget27
  • 544
  • 5
  • 14
6
votes
2 answers

getting simple membership to work with azure web sites

I am wanting to use the simple membership providers as if i was connecting to a local mdf file for this mvc project, except i want the memebership tables on the free azure trial…
6
votes
1 answer

webpages_UsersInRoles missing

I am using ASP.NET MVC 4 together with SimpleMemmbership. When I built my application the following tables were built automatically webpages_Membership webpages_OAuthMembership webpages_Roles I can successfully register users. However, the…
jjc99
  • 3,559
  • 4
  • 22
  • 21
6
votes
1 answer

How to specify # of failed login attempts for account lock in MVC 4 w/ default simplemembership provider

How can you specify the # of failed logon attempts with the default simplemembership provider in ASP.NET MVC 4? I see there is an unlock account method but I don't see anywhere you can specify the # of failed attempts that cause the account to…
Xaxum
  • 3,545
  • 9
  • 46
  • 66
6
votes
1 answer

MVC4 : What entity represents table webpages_Membership

I'm trying to access webpages_Membership table (I'm using SimpleMembership) to retrieve the account ConfirmationToken. How do I access this table from my model/controller/DAL? The only thing I can think of is executing pure SQL from my code to get…
9999bao
  • 191
  • 1
  • 2
  • 5
5
votes
2 answers

System.NotSupportedException: Specified method is not supported

Is it possible to get the password of a user? How, please? When I've tried this code : WebSecurity.InitializeDatabaseConnection("nectarys-pc.MonitoringN.dbo", "Superviseur", "UserId", "matricule", autoCreateTables: true); var membership =…
5
votes
2 answers

how to make simple membership provider from empty web application template in asp.net mvc 4?

How do I configure a Simple Membership provider starting from an empty ASP.NET MVC 4 template? I've searched a lot on Google, Bing and many others, but I didn't get any positive response about the membership provider. Can some one tell me the basics…
5
votes
6 answers

ASP.NET MVC authenticates and authorizes non-existent users

I'm using the DropCreateDatabaseAlways Initializer so my database gets destroyed every time I start the application (at least I hope so). The funny thing is I still see myself as logged in. I get pass the Authorize attribute and can do dangerous…
5
votes
1 answer

Keeping Simple Membership OAuth Session Alive

We are using the Simple Membership Provider with ASP.NET MVC 4, and we're using the Facebook Client to provide Facebook login support (similar to http://www.asp.net/mvc/overview/getting-started/using-oauth-providers-with-mvc). We have gotten this…
BlueSam
  • 1,888
  • 10
  • 17
5
votes
3 answers

using WebSercurity.CreateAccount with other queries in a TrasactionScope, without DTC Enabled

Problem. In a registration scenario, I'm trying to insert a user in my User table and then call WebSercurity.CreateAccount for that user (in a transaction). This causes the error that MS DTC is not available on the server. Description. The reason…
5
votes
2 answers

SimpleMembership password reset hyperlink 401 redirects even with AllowAnonymous

I'm attempting to migrate my MVC4 application from ASP.NET Membership to the new SimpleMembership and have run into a snag with password resets. In my Login view, I have "Forgot Password" hyperlink that does an AJAX post to an action that sends an…
AJ.
  • 16,368
  • 20
  • 95
  • 150