Click here to Skip to main content
15,892,072 members
Everything / Membership

Membership

membership

Great Reads

by adriancs
Integrate Google OAuth 2.0 with ASP.NET in C# for seamless user authentication
by ASP.NET Community
"ASP.NET Membership builds on the success of the Forms authentication model from ASP.NET 1.x. ASP.NET Forms authentication provides a convenient way
by ASP.NET Community
Here are a few good tutorial articles that provide a good conceptual overview of how the new membership and role management system works. Check out
by ASP.NET Community
If you use the asp.net membership providers, having visual studio keep this sql database file around for deployment can sometimes be convenient.

Latest Articles

by adriancs
Integrate Google OAuth 2.0 with ASP.NET in C# for seamless user authentication
by Sajid Qayyum
Describes authentication management using cookies
by ASP.NET Community
When working with an ASP.NET site that requires some sort of user authentication (almost every time, I'd say), we often need to establish our own
by ASP.NET Community
If you use the asp.net membership providers, having visual studio keep this sql database file around for deployment can sometimes be convenient.

All Articles

Sort by Updated

Membership 

27 Dec 2014 by .Net Jim
Give this a try for some direction.[^]
22 Dec 2012 by Abdullah Al-Muzahid
To increase the timeout I have written the following codes in we.config
23 Oct 2013 by Abdullah Al-Muzahid
I want to send an email whenever the user is locked out. I am using ASP.NET Membership framework. Is there any way to determine or handle any event when a user Locked Out
2 Apr 2014 by Abhinav S
Mouse hover over your id at the top right corner.Then go to settings.You will see "Password" with a Change URL option next to it.
22 Dec 2012 by Abhishek Pant
http://stackoverflow.com/quest...
30 Jun 2015 by acmedeepak1
Please let me know how to implement SimpleMembership in MVC4 Application. Mine is an empty app and I have included the filter. My project needs the login control to be a partial view. in this case I developed the project and found no tables created at the registered link click.
18 Jan 2024 by adriancs
Integrate Google OAuth 2.0 with ASP.NET in C# for seamless user authentication
12 Nov 2014 by Afzaal Ahmad Zeeshan
The error is quite self-explainatory. You just need to restart the tool "Web Site Administration Tool" that you're using in your project. That will fix the problem.
21 Mar 2015 by Afzaal Ahmad Zeeshan
You should try wrapping the name between [] and then trying it again. Such as, [ApplicationName] and then try. If doesn't work, please change the column's name inside your database table and try something else.
21 Jan 2016 by Afzaal Ahmad Zeeshan
Despite the fact that Sergey brings up in his comment to your question, the task is still very tough to be performed for an actively used application. I would assume that you meant to say, "SHA1" hashing algorithm. Encrypting using SHA1 would be as if you only want encrypt, and not decrypt....
15 Mar 2013 by Ahmad Abd-Elghany
i have student table , doctor table , Supervision table . i want to link all that tables with Membership tables , every one of the student and doctor etc..have a user account , student will loin by there Student ID not there User Name like other member .how can i do that , and should i use...
14 Apr 2013 by Ahmad Abd-Elghany
is there any full tutorials to work with asp.net member ship and sql membership but with custom pages not wizards ?
20 Apr 2013 by Ahmad Abd-Elghany
How can I programmatically validate the current password then change it with the new password in membership ?and how can i reset the password when forgotten and send email with the reset link ?
30 Jul 2013 by Ahmad Abd-Elghany
i cant reference the membership provider in my BLL ! i can't find :using System.web.security and i don't know how to reference it to the BLL, as its deal with its own DAL i know i don't need to use it with my DAL.but how can i use it with in my Tier project
30 Jul 2013 by Ahmad Abd-Elghany
Reference System.Web
10 Jan 2019 by Alex (RSA)
How do I contact a member with a private message ? I read an article which the member wrote, and I have a question for him which is "sort of" , but not really related to the topic of his article, hence I do not want to ask the question in the comments section of the article. What I have...
5 Jan 2014 by Andreas Gieriet
If a CP member accepts direct contact, he will have posted some contact information in his CP profile.Otherwise, the CP member does not wish to be contacted directly.If there is a related post for your question, reply on that post.CheersAndi
8 Sep 2016 by Andy Lanng
Hi,I am using Membership Providers to control user accessI get how the timeout works. That's already in place.We have a suite of software, some web based (aspx) and 1 windows, but that's my colleagues problem ^_^When a user is added to the system, we create an account in 4...
14 Sep 2016 by Andy Lanng
Hey,I asked a similar question a couple of days ago, but I don't see the same effect as described.Essentially, I use ASP with form authentication. I manage users with a membership provider, but it has been pretty extensively customized.It is possible that a user might have...
12 Feb 2016 by Ankita1391
I want to remove email field from CreateUserWizard. I removed email by adding 'requiresUniqueEmail="false" ' to web.config and setting 'Enables="false" ' of 'EmailRequired'.But now my concern is how user can get his password when he reset password by ForgotPassword using 'PasswordRecovery'.I...
11 Oct 2013 by ASP.NET Community
"ASP.NET Membership builds on the success of the Forms authentication model from ASP.NET 1.x. ASP.NET Forms authentication provides a convenient way
11 Oct 2013 by ASP.NET Community
Here are a few good tutorial articles that provide a good conceptual overview of how the new membership and role management system works. Check out
11 Oct 2013 by ASP.NET Community
If you use the asp.net membership providers, having visual studio keep this sql database file around for deployment can sometimes be convenient.
11 Oct 2013 by ASP.NET Community
When working with an ASP.NET site that requires some sort of user authentication (almost every time, I'd say), we often need to establish our own
15 Apr 2013 by babu saravanan
ASP.NET Membershipcreating-the-membership-schema-in-sql-server-csASP.NET Membership
16 Apr 2013 by babu saravanan
There are a few disadvantages but i guess names of the fields would only be helpful in case of sql injection attacks, but even without field names, the same problems arise. Passwords are by default encrypted in the initial version provided. I would rather say that other disadvantages like the...
23 Dec 2013 by Ben Oats
Ok i think ive got the code right but im getting this error when i run the program, Data type mismatch in criteria expression. { da.InsertCommand = new OleDbCommand("INSERT INTO Rented (DVDID, UserName) VALUES (@rent, @username)", conn); var currentUser =...
28 Apr 2013 by blu_eagle
Server Language : c#Client Language : javascriptSoftware in Use : Visual Studio 2012 I have a project in hand which requires the use of1. login controls2. membership classOne big hiccup is that I was requested to create the application without using the default database...
12 Mar 2012 by botskie
Try this site dude for your custom membership provider; this also includes custom role provider.http://www.brianlegg.com/post/2011/05/09/Implementing-your-own-RoleProvider-and-MembershipProvider-in-MVC-3.aspx[^]
12 Sep 2013 by Carlos Baena
I configured a lightswitch application with an aspnet membership database. I use it to add users and roles. Now, I want my WPF to use Client Application Services with Windows Authentication set up to an specific applicationName (Same used in LightSwitch)After configuring my project in the...
7 Oct 2013 by Carlos Baena
Problem solved for my scenario.I ended up using the code exactly as I mentioned originally. But in order to make it work, I needed to create a group of tables as mentioned in http://msdn.microsoft.com/en-us/library/bb384312.aspx.Then instead of using the aspnet membership database, I use...
23 Nov 2012 by cass3000
I have a custom MembershipProvider based on this example[^] from msdn.I defined the minRequiredPasswordLength and minRequiredNonAlphanumericCharacters in my web.config like this: ...
23 Nov 2012 by cass3000
I found the solution here[^].
8 Apr 2013 by CHill60
If you have used any of the "standard" tools for encryption then they are specifically designed to prevent decryption - you would be better off offering a replace-password option with (encrypted) security questions to validate.Have a look at the discussions here...
7 Aug 2012 by Christian Amado
You can Add your column in database (e.g. aspnet_users table), modify stored procedures that affects to your modified table. That's all from DB.Now in your aspnet project, Add a new class that extends from Membership or MembershipUser depends on your requirements. Add the property (column of...
23 Dec 2013 by Christian Graus
Data Type Mismatch means that the data you're giving the DB does not match the data in the column of the database.
23 Oct 2018 by CPallini
That's because the consumer and producer threads outlive the main thread (your program terminates immediately after thread creation). Try, for instance: #include #include class produceconsume { public: produceconsume(){} virtual ~produceconsume(){} ...
8 Jan 2015 by DamithSL
you need to reset the timer on every postback, check below article : Session Time Out Warning Message Using jQuery in ASP.NET[^]
23 Nov 2015 by DanielBrownAU
String usern = CreateUserWizard1.UserName;MembershipUser usr = member.GetUser("usern",false);The line is looking for a "hard coded" user name "usern" which I think you meant for it to use the line above, without the quotes (")Making it:String usern =...
24 Feb 2015 by Darshan.Pa
For that you have to write some extra in your web.config file as per the example given below ...
14 Sep 2014 by deelll
I want to use ASP.net membership provider and enable to use data of user account in my customized database instead of the database that is created automatically by ASP.net Security.Problem statement:I can't find a user-friendly tutorial about creating a membership provider for a beginner.
26 Dec 2014 by deepankarbhatnagar
Go to this link below for help,http://stackoverflow.com/questions/18570173/create-an-avatar-upload-form-for-users[^]
16 Jan 2014 by Deviprasad Das
You need to rely on cookie for achieving this.
29 Apr 2015 by divyang4482
try to check what is cookies's domain name ( you may find in config file)
18 Jan 2020 by dnxit
I Assume you want to give option of registration to some particular role, so here are the steps you need to follow First create a role, then Assign the role to those users you want to allow and Last you need to put Authorization on all those actions. For creating a role you can use Role...
30 Jul 2012 by Dougie the P
Code project membership Will not let me change password!
21 Jul 2013 by Dovlet Mamenov
I have created an ASP.net MVC4 application with Internet application template, and want to add List property to MembershipUser object provided by ASP.net builtin Authetication.This List property will be a list of StockPermission object:public class StockPermission { ...
28 Jul 2013 by Dovlet Mamenov
To add List property to our MembershipUser object or any other properties we can create custom MembershipProvider and custom MembershipUser classes describer in this article:http://msdn.microsoft.com/en-us/library/ms366730(v=vs.100).aspx[^]
26 Dec 2014 by eboolean
Hi;How can i take member profile picture (avatar) in asp.net mvc app register form. @Html.FileUploadFor(m => m.ProfileAvatar) @Html.FileUploadFor(m => m.ProfileAvatar)*This is not working.Only example.I would appreciate if you can...
19 Oct 2020 by elagamy
we develope web application using asp.net webforms and active directory membership provider ,it work fine on local or on any server has our domain but when I published it on azure not work and return that message "Unable to establish secure...
6 May 2016 by ernie_hudds
Hi, I am in and out of web development (mostly write Winforms apps) and although I get the how to write MVC apps and the security model that roles with an "Internet" solution - it would be nice if several websites that you create could interact and authenticate users against ONE purpose built...
12 Aug 2015 by F-ES Sitecore
When you get an error always say what the error is, believe it or not but it makes a difference.You are only returning a single object (RolesAndUser) so your Model is a single object, and you can't "foreach" on a single object. Your controller code isn't doing what you think it is doing...
12 Sep 2015 by F-ES Sitecore
Membership doesn't use MVC or EF, it is a separate technology. If you are implementing your own provider then the important thing to gain from the examples is how you implement the provider itself, just use your own database code to access the tables, there is nothing forcing you to use EF.
8 Sep 2016 by F-ES Sitecore
So every time a user is created you want to log everyone out? Doesn't make sense to me. Also why do you want to log people out? What is the advantage of that?Regardless, if you are logged in is dictated by cookies and you can't update the cookies on people's machines unless they are...
21 Mar 2015 by fahd951
Hi Developers, Hope everybody doing well .. I'm trying to work with ASP.net membership also integrated with my APP,first I've created a sample web app to create the new users to membership table I've Added the membership tag to web.config and change the connection string to my...
13 Sep 2013 by fasher_the_one
I'm working with a database of ASP Membership, where users create, add roles, among others.I want to know is how to manage users, without being part of the ASP.NET Configuration, which is inside the Visual Studio. What I want is in my application to create a form, where the user and...
12 Sep 2015 by frostcox
Hey I have an MVC project that I am working on and I want to use a sql server database to store all the ASP.NET's membership details. I see loads of examples online on how to do this but all of them seem to be with using EntityFramework which I do not want to do. I have the sql database and...
27 Apr 2015 by Gaurav K Mishra
Hi,I am using following code for form authentication in login page.System.Web.Security.FormsAuthentication.SetAuthCookie(userId, false);It is working fine on staging with all browsers but After hosting in Production I am trying to access login, It is working fine in all browsers...
29 Nov 2017 by Geneen
Hello, I am an Accountancy student but I need a membership database for a school project and I have no idea how to accumulate data of different years and so I thought of trying to filter it using a field for the year they joined. The user will be asked to input their Student number name,...
24 May 2016 by Grant Weatherston
WebSecurity.ChangePassword() method is returning false (i.e failing to change). I have provided the correct paramaters (username, newPassword, confirmPassword).The method fails (returns false).After checking the Membership Database, the account i'm trying to change the password of, the...
10 Jul 2013 by harrydinho
Hi,I have a web application with a SQL DB project linked to a database and have generated the .Net Membership DB using aspnet_regsql.I then have a number of tables that I want to have foreign keys referencing some of the generated tables but I get errors because VS can't see that the...
30 Apr 2015 by HimaBindu Vejella
Use Fiddler to investigate further .
6 Jan 2014 by Jaden Parker
To create a new role in ASP.NET MVC,maybe you can try this code :@{ ViewBag.Title = "RoleCreate"; Layout = "~/Views/Shared/_LayoutAdmin.cshtml";}   @Html.ActionLink("Roles", "RoleIndex") | @Html.ActionLink("Add Role to User",...
14 Apr 2014 by jainbhaiiit
Hi, I have an application ABC built in ASP.NEt Web forms , ABC is the parent application of all small application in my organization.I have another application XYZ , which is a small application develomed in MVC 4what I need to do is , 1. when a user is logged in in ABC , he has a...
6 Sep 2013 by Jameel VM
You should change view return type of IEnumerable> because this type is responsible for loading a collection of type,ie is the type now loading in the index view. if you want to load multiple collection you should create a new ViewModel class and add two property like below public...
18 Jan 2020 by JamiePattison
Trying to grasp how I should use MVC 4 (VS 2013) with Forms Auth. Heres the steps i took 1. Create a new project ASP .Net MVC 4 > Internet Application (A default ASP.NET MVC 4 project with an account controller that uses forms authentication.). 2. Run app and all runs. I create a user using...
17 Jul 2013 by Jean A Brandelero
Do you have a unique id for each user? There are many ways...When you save in the database, identify the row with the user id. OrIf you save it as a file, create folders with user ids like "files/%id%/" and save files inside. You can list files by user using the path and...
27 Jan 2021 by Jean-Claude Lanz
Hello, I will be back in CodeProject but I see that the Member 36492 is me. May be I have two different accounts ? Can you correct this and merge the 36492 member into this ? Thanks Lanz Jean-Claude jean-claude.lanz@jclaude.ch old, not more...
28 Jun 2012 by Jeeva G
Add following code in your webconfig file
25 Sep 2012 by JF2015
There is no setting. For deleting your account you should post your request to this forum:http://www.codeproject.com/Forums/1645/Site-Bugs-Suggestions.aspx?fid=1645&fr=51#xx0xx[^]
16 Apr 2013 by Jiban jyoti Rana
What is the Advantages and Disadvantages of using ASP.NET's default Membership?Can we add custom Membership to our project?
24 Jul 2013 by Jiban jyoti Rana
I have used ASP.NET Website Configuration To my application. It works in my Local Server fine but When i publish to the hosting server it shows error while login and login fails with an error.The error is "Server Error in '/' Application."Please help me out what to do.
6 Jan 2014 by JoCodes
Refer Extending Identity Accounts and Implementing Role-Based Authentication in ASP.NET MVC 5[^]Hope this helps you...
17 Jul 2013 by Joezer BH
You can:1. Use private folders - create a folder for each user and have them work with their private folder only (and then perhaps also add a shared folder etc).2. You can manage permissions. This can be done either on the application level - keep records of the files uploaded by the...
16 Jan 2014 by kashmir11
Use Cookies to save User name and password to browser Protected Sub Login_Click(ByVal sender As Object, ByVal e As EventArgs) If chkRememberMe.Checked Then Response.Cookies("UserName").Expires = DateTime.Now.AddDays(30) Response.Cookies("Password").Expires =...
7 Jan 2014 by kenexcelon
Hey guys, I setup the standard ASP .NET membership provider in an application. However, the issue referenced in the question above has happened a few times. I'm not sure why it continues to happen. It happens upon first load of the application as I'm using the function that grabs all users...
11 May 2013 by Konstantin Tarkus
Web Application Starter Kit for .NET DevelopersHere is a sample project which implements custom membership solution on top of the ASP.NET MVC, Entity Framework, custom database schema, external login / signup functionality, email service and...
21 Oct 2014 by Kornfeld Eliyahu Peter
A little Google can get you so far....http://msdn.microsoft.com/en-us/library/system.web.security.membershippasswordformat(v=vs.110).aspx[^]http://referencesource.microsoft.com/#System.Web.ApplicationServices/Security/MembershipPasswordFormat.cs[^]
2 Apr 2014 by Krunal Rohit
Go here[^] and there you will find one field named as Password, and near to that there's a link is given to changed the password. Hover on it, you will get the pop up to change it.-KR
12 Aug 2015 by lokopi.nagar
I am trying to get the Roles for all users like this.public ActionResult RoleIndex() { var profilesList = db.UserProfiles.Select(u => u.UserName).ToList(); RolesAndUser r = new RolesAndUser(); if (profilesList.Count > 0) { ...
24 Jan 2022 by Luc Pattyn
You shouldask one of the admins; a better place to post would be the "Sucks & bugs" forum. Does this help: ADAM and LDAP Client.Net - LDAP Access Control for ASP.NET[^] :)
24 Jan 2022 by Luc Pattyn
You should post here: Bugs and Suggestions[^] That is the only forum the admins are bound to read and act upon. :)
13 Sep 2013 by M.Saied
this is series of lessons help you to admin you membership form your app [Here]
17 Nov 2013 by Maciej Los
Walkthrough: Using Forms Authentication in ASP.NET MVC[^]It should be enough for start ;)
24 Feb 2014 by Maciej Los
Here is a proper board to ask above question: Site Bugs Suggestions[^]
9 Jul 2015 by malhotraisha3388
hiyou can use the following link to do the form based authenticaionhttp://tutorial.techaltum.com/Form-based-atuthentication-in-MVC.html[^]
2 Nov 2014 by Manas Bhardwaj
Website Administrator Tool was technically removed because VS 2013 no longer uses the Cassini web server. Please see:http://forums.asp.net/t/1940600.aspxBut you can access it as before based on this...
17 Nov 2013 by Manish Sahdeva
Hi, Dear all, I just want to implement authentication in my mvc application, actually, I do not know the procedure of authentication mvc, like in asp.net we use the forms authentication, create the authentication ticket with our custom data tables and create the page base for authentication...
10 Jul 2014 by mathias&daddy
the button save my settings do not react when pressed ?
24 Feb 2015 by Md NasirUddin
I have been developing a web application project. I have used Asp.Net Membership API to apply security to the application. For security reasons I would like to limit the page access based on Roles.I have some pages on root folder in my project and a subfolder named Account in my project...
5 Jan 2014 by Member 10505083
How do I contact another member?
23 Nov 2015 by Member 12115140
I use two membership provider in a webpage, an error said "Object reference not set to an instance of an object."when come to setting IsApproved=true. I find out the problem is the provider="MySQLMembershipProvider", it should be "MySQLMembershipProvider2". But even I already set it to...
21 Nov 2015 by Member 12157739
Hi there (long time reader, first time poster)Here is problem folks, I have lots of services using the standard AspNetSqlMembership authorization. ...
6 Oct 2018 by Member 14010043
Hi All I want to get the UserId of the user that register now. my table's ID is uniqueidentifier. thanks. What I have tried: MembershipUser user = Membership.GetUser(CreateUserWizard1.UserName); Guid userId = (Guid)user.ProviderUserKey;
2 Apr 2014 by Member 3123559
Where do I go - to change my CodeProject.com Password ?I just received a temporary password - which (obviously) worked great !!But after logging off, & lateer returning - is this new "temporary password" my actual password to use from now on ?(translation : WHERE can I go - to...
27 Jun 2012 by Member 3491662
Hello,I have been searching and searching for a solution when it comes to programmatically creating users to the membership database, but nothing so far has worked for what I need.I hope someone here can help me out or at least guide me in the right direction.In a few sentences I...
21 Jan 2014 by Member 3530203
Hi, Currently my application is using SHA1 algoritham for password in membership provider.Framework I am using in 3.5SP1.This application is in production.Now we are working on some change requests and one of the request from client is to upgrade hashing algoritham from SHA1 to SHA3.So can...
24 Dec 2013 by Member 3891286
How do I go about removing this account?Thank you,
4 Aug 2014 by Member 8397864
I am having a database with ASP.NET membership tables, stored procedure and values in it.Now i am creating a new application in MVC5 with default login page. How can i use those tables in that old DB for login?I do not want to use ASP.NET Webpages tables for login functionality which...