Questions tagged [simplemembership]

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

596 questions
18
votes
4 answers

Get logged in user's id

How can I get the logged in user's UserId? I'm using the standard system generated AccountModel. I can get the username using: User.Identity.Name but I don't see the UserId field. I want to use the UserId as a foreign key for another table.
naveed
  • 1,395
  • 2
  • 15
  • 29
18
votes
2 answers

use the salt when using SimpleMembershipProvider

Possible Duplicate: WebMatrix WebSecurity PasswordSalt is there a way to have simpleMembershipProvider use the salt? when I create my mvc4 web project and set the default connection to sqlexpress, then register, my users do not have a password…
eiu165
  • 6,101
  • 10
  • 41
  • 59
17
votes
4 answers

SimpleMembership - anyone made it n-tier friendly?

"SimpleMembership", we're told, is the future of asp.net membership / role management. The MVC4 "Internet Application" template implements Account management using SimpleMembership. However, the way it is implemented merges all the application…
Dave R
  • 1,626
  • 19
  • 28
16
votes
2 answers

Using MVC 4 SimpleMembership with an existing database-first EF model

I am trying to use SimpleMembership in my MVC 4 for the first time and I already have an existing database and EF5 model created based on it! I searched a lot but I cant find how I could use it in my case and also to have everything under my own…
16
votes
1 answer

ASP.Net MVC 4 and WebSecurity - User Registration Confirmation through Email

I am using the default Internet Application template of ASP.Net MVC 4 project. The Register action in the Account controller is like this - [HttpPost] [AllowAnonymous] [ValidateAntiForgeryToken] public ActionResult Register(RegisterModel model) { …
Santosh
  • 2,430
  • 5
  • 33
  • 47
15
votes
1 answer

MVC4/ Google OpenID limit to specific Google Apps Domain(s)

I created a new MVC4/.NET4.5 project and enabled Google OpenID. This worked, shockingly easily. My company has "gone google" and our domains/ employee identities are in the Google Apps webspace. How can I allow only our Google Apps domains to…
Jeremy Holovacs
  • 22,480
  • 33
  • 117
  • 254
14
votes
3 answers

Change password length in MVC 5 Membership

Trying to change the default minimum password length to 4 characters. I know, 4!!! Ridiculous, right! Not my call. Anyway, I've changed it on the RegisterViewModel but that doesn't actually change it. To illustrate I've posted the code below. The…
Refracted Paladin
  • 12,096
  • 33
  • 123
  • 233
13
votes
1 answer

Do I need to use `[ValidateAntiForgeryToken] and @Html.AntiForgeryToken()` on all my pages?

All my project's page need authentication.. And Normally I dont use [ValidateAntiForgeryToken] and @Html.AntiForgeryToken() on my Controller and View.. Only login page has it.. What are they [ValidateAntiForgeryToken] and…
yusuf
  • 1,233
  • 1
  • 15
  • 29
13
votes
2 answers

change password in MVC 4

I am building ASP.NET MVC 4 application. I use Simple Membership provider to manage authentication and authorization within the system. What are the ways of changing the password in this approach. I found a ChangePassword method which takes three…
Bartosz
  • 4,542
  • 11
  • 43
  • 69
13
votes
2 answers

Why Claim based authentication instead of role based authentication

I am new to claim based authentication. I have gone throught several aricles and could not able to figure out the exact use of claim based authentication. Here are some doubts I have about claim based authentication. I would like to know what is…
12
votes
2 answers

How can I customize simple membership provider to work with my own database ASP.NET mvc 4

I’m exploring ASP.NET MVC 4 these days. I will be pleased if someone can help by answering my question . I am building an academic project "Project management and support system" . I have designed my own database , I have my own tables for the users…
11
votes
1 answer

How to use SimpleMemberShip Provider in Asp.net MVC 4 application

Although i have been through this article http://blog.longle.net/2012/09/25/seeding-users-and-roles-with-mvc4-simplemembershipprovider-simpleroleprovider-ef5-codefirst-and-custom-user-properties/ but i dont know is it correct way to use simple…
Yogesh
  • 3,044
  • 8
  • 33
  • 60
11
votes
2 answers

SimpleMemership CreateUserAndAccount Customization

I am trying to add a new property to the UserProfile class in my model public class UserProfile { [Key] [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)] public int UserId { get; set; } public string UserName { get; set;…
11
votes
5 answers

SimpleMembership, MVC4, AuthorizeAttribute and Roles

I’m trying to add authorize attributes to some of my MVC4 controllers, and they work fine as long as it’s a plan [Authorize] or [Authorize(Users="myuser")], but the second I add in any sort of role filtering it falls apart, eg.…
Dylan Parry
  • 3,373
  • 6
  • 26
  • 38
10
votes
5 answers

Online Users on ASP.NET Application

Saw so many articles and links related to the same concept. Counting online users using asp.net Is there any ASP.NET application to monitor online user and page view log report? Mine is little different. My application is MVC4 and using…
Chatra
  • 2,989
  • 7
  • 40
  • 73
1
2
3
39 40