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
1
vote
2 answers

Display custom errors when using ASP.NET MembershipProvider

I'm using a custom MembershipProvider in my application, and it's all wired up correctly. The only missing piece is the ability to display custom error messages depending on the result of the authentication. The ValidateUser() method only returns…
1
vote
1 answer

This asp.net password recovery code has an error. Can anyone spot it?

We use email address instead of user id. But when the user enters his email address into the password recovery form and submits it, the site returns "We were unable to access your information. Please try again." and replaces the email value in the…
hughesdan
  • 3,019
  • 12
  • 57
  • 80
1
vote
2 answers

create a custom membership and profile provider in asp.net

I have a custom database schema that I want to use for the Custom Membership Provider. Can anyone give a step by step procedure to do so because when I tried to create a class library project and extended my CustomProvider there was no…
Piyush
  • 886
  • 3
  • 9
  • 28
1
vote
2 answers

How can I improve my method to get filtered data from user profile objects?

I've hacked the following code together to get some details from my users' profile data. It works, but isn't pretty. I have a UserPreferences object that is saved in the users' profiles. It has properties for whether SMS alert messages are desired…
JustinStolle
  • 4,182
  • 3
  • 37
  • 48
1
vote
1 answer

Is it OK to go from Hashed to Encrypted password type in an ASP.NET membership provider?

I've have an asp.net web app, forms authentication, that's uses Hashed password type. Will I run across any problems if I change the password type to Encrypted? I see that, if I change to Encrypted, attempted password recovery for old hashed…
1
vote
5 answers

user login not being remembered

Hi for some reason users are being automatically logged out after a few minutes. i cant pinpoint how long - maybe ten minutes. basically if i log in, close the browser and reopen my site then i am still logged in. however if i close and come back…
raklos
  • 28,027
  • 60
  • 183
  • 301
1
vote
1 answer

ASP.NET Multiple login 'levels' - OAuth & Forms

I am about to join what must be tens of thousands of other developers by adding an OAuth login (Facebook login) to an existing ASP.NET site that currently uses Forms authentication. Unfortunately we cannot give full access to the site to users who…
Mr. Flibble
  • 26,564
  • 23
  • 69
  • 100
1
vote
4 answers

How to read the .NET reflector --- for MemberShipProvider

I am implementing the MembershipProvider. So I want to refer to the implementation of sqlMemberShipProvider by Microsoft in .NET reflector and find an interesting thing: for RequiresQuestionAndAnswer, it retrieve value of _RequiresQuestionAndAnswer…
freeflying
  • 215
  • 3
  • 12
1
vote
3 answers

What will happen to asp.net membership if the client browser is not accepting cookies

This thing has just came to my head and I wanna share it. Note : I could easily test it but I am being lazy here to see if anybody has ever experienced something like that before. Let's assume that I have a web site which built-in membership…
tugberk
  • 57,477
  • 67
  • 243
  • 335
1
vote
2 answers

Multiple membership providers in ASP.NET (web.config + sql)

I know this question is asked (and answered) a lot already, but I believe my situation is unique. We are using the ASP.NET SqlMembershipProvider. However, we also have some less-secure content we would like to secure by adding users directly to the…
1
vote
1 answer

Implement custom "ValidateUser" in MembershipProvider

I am implementing a custom MembershipProvider and I am trying to get the ValidateUser method to validate against my Profiles table in SQL Server. This table has columns called UserName and Password. public override bool ValidateUser(string username,…
1
vote
1 answer

Set ASP.NET Authorization for a sub-directory in web application programmatically

I've got an ASP.NET application that uses the CreateUserWizard to register new users. Part of my registration process is creating a "home directory" for the user where they'll be able to upload files. I'd like to use the ASP.NET authorization…
Matt Crouch
  • 1,708
  • 2
  • 18
  • 29
1
vote
3 answers

Best way to check a setting in all profiles

Using ASP.net, is there a recommended best way to access a particular field of the profile in code. I was looking in my old Problem-Design-Solution 2.0 book, and it does it by pulling all members in the DB and then iterating through each one's…
yougotiger
  • 434
  • 4
  • 18
1
vote
1 answer

What SQL Server role do you pick for a normal user for ASP.NET Membership?

I used Integrated Security for a database connection for the first time for a website. The website pool uses Network Service as a user. I added Network Service as a SQL Server user mapped to public, then allowed it access to my database as…
Zachary Scott
  • 20,968
  • 35
  • 123
  • 205
1
vote
2 answers

Getting authenticated user's username on a subdomain

I have Forms authentication setup for an ASP.NET 4.0 application on http://example.com - we'll call it MainApp. I also have an ASP.NET 4.0 app running on http://static.example.com which (let's call it SubApp) doesn't have access to the main app.…
Andrey
  • 20,487
  • 26
  • 108
  • 176