Questions tagged [asp.net-membership]

ASP.NET membership gives you a built-in way to validate and store user credentials.

ASP.NET Membership works on top of forms-authentication and gives you:

  • Ability to create and store users and their passwords with little or no code.
  • Out-of-the-box support for changing, resetting, retrieving and encrypting passwords.
  • Choice of two storage locations - SQL Server and Active Directory.
  • Custom providers can be created to store users in custom stores

Resources

MSDN - Introduction to Membership
4guysfromrolla - Examining ASP.NET's Membership, Roles, and Profile

3256 questions
162
votes
22 answers

The required anti-forgery form field "__RequestVerificationToken" is not present Error in user Registration

I am using Membership.create user function, then the following error is occurring, The required anti-forgery form field "__RequestVerificationToken" is not present How can I fix this?
Hemant Soni
  • 2,051
  • 4
  • 16
  • 16
110
votes
10 answers

How to assign Profile values?

I don't know what I am missing, but I added Profile properties in the Web.config file but cannot access Profile.Item in the code or create a new profile.
zsharp
  • 13,656
  • 29
  • 86
  • 152
79
votes
4 answers

Why is included in the following example?

The ? wildcard represents unauthenticated users while * represents all users, authenticated and unauthenticated. My book shows the following example of URL authorization:
61
votes
1 answer

How do I use my own database with SimpleMembership and WebSecurity? What is MVC4 security all about?

I've read everything on this topic I could find, including MSDN articles and SO posts, but I'm still very lost and confused. Questions Please answer the following (briefly, if possible): What is SimpleMembership/SimpleMembershipProvider…
60
votes
10 answers

asp.net membership change password without knowing old one

Evaluting the method signature, it is required to know old password while changing it. membershipUser.ChangePassword(userWrapper.OldPassword, userWrapper.Password) Is there any way to change password without knowing old one.
Lalit
  • 4,897
  • 7
  • 32
  • 36
52
votes
19 answers

SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified

Well i have a big problem that i'm trying for days to solve but i could not do it, so i need your help. I have a web application in asp.net 4.0 where i implemented custom membership and role providers. When i open the app homepage in it connects to…
47
votes
5 answers

ASP.NET MVC - Alternative to Role Provider?

I'm trying to avoid the use of the Role Provider and Membership Provider since its way too clumsy in my opinion, and therefore I'm trying to making my own "version" which is less clumsy and more manageable/flexible. Now is my question.. is there an…
ebb
  • 9,297
  • 18
  • 72
  • 123
47
votes
1 answer

ASP.NET MVC 4 Web API Authentication with Membership Provider

I have an ASP.NET MVC 4 Project using the Web API. On the controller I have set the class to require authorization using the [Authorize] attribute. For Authentication I am using the ASP.NET Membership Provider and have my Web.Config set to use…
45
votes
6 answers

How to obtain a list of Users from ASP.NET Identity?

Edit: This question is outdated The Identity Framework was a moving target at the moment I asked this. The authors changed quite a few things and they have decoupled several others, making everything easier. Have a look at the Asp.NET Identity…
41
votes
2 answers

How does the Authorize tag work? - ASP.NET MVC

How does the Authorize Tag determine if the user is authorized or not? Like say, if a user logs in and they try to go to a view that has an Authorize tag. How does it determine if a user is authorized or not? Does it do a query to database and…
chobo2
  • 83,322
  • 195
  • 530
  • 832
40
votes
2 answers

Custom MembershipProvider in .NET 4.0

There are a few threads here at so about this matter but most of them are outdated and the reference links in them are even more outdated. I got this website which I need to connect to an external sql server (mssql) with it's own table structure,…
Eric Herlitz
  • 25,354
  • 27
  • 113
  • 157
40
votes
1 answer

Using multiple membership providers within ASP.Net MVC 3 application

I am adding a new area to an existing mvc 3 razor app as an admin area for managing some settings and content. The rest of the site is currently secured by a custom provider that authenticates our clients. Now I need to authenticate some employees…
JBeckton
  • 7,095
  • 13
  • 51
  • 71
40
votes
1 answer

Custom Authorize Attribute

I'm building my own membership system and I want nothing to do with the MS Membership provider. I've looked around the internet and here on StackOverflow but all I could found was membership providers built on top of the MS Membership…
Kassem
  • 8,116
  • 17
  • 75
  • 116
40
votes
8 answers

Membership Generate Password alphanumeric only password?

How can I use Membership.GeneratePassword to return a password that ONLY contains alpha or numeric characters? The default method will only guarantee a minimum and not a maximum number of non alphanumeric passwords.
Curtis White
  • 6,213
  • 12
  • 59
  • 83
40
votes
6 answers

When the same user ID is trying to log in on multiple devices, how do I kill the session on the other device?

What I want to do is to limit a user ID to only being able to log in to one device at a time. For example, user ID "abc" logs in to their computer. User ID "abc" now tries to log in from their phone. What I want to happen is to kill the session…
1
2 3
99 100