Click here to Skip to main content
15,892,161 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 

18 Jan 2024 by adriancs
Integrate Google OAuth 2.0 with ASP.NET in C# for seamless user authentication
3 Mar 2023 by OriginalGriff
Membership of CodeProject is completely free: in the nearly 14 years I have been here, I have never once been asked for money, or credit card details - and I don't expect to either! To the best of my knowledge there is no "premium membership" -...
3 Mar 2023 by User 15903938
Hi, I recently joined and I don't know if this account is for free, because there is also something as premium membership? Thanks. What I have tried: looking into terms of use and searching the 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. :)
24 Jan 2022 by Sean Ewington
Hi Peter. Can you please make a post about this on our Site Bugs and Suggestions forum? Bugs and Suggestions[^]
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[^] :)
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...
27 Jan 2021 by OriginalGriff
Hi! You need to bring this to the attention of the admins - who may want you to prove you are the other account via it's email address - so please post this here: Bugs and Suggestions[^] The admins read everything there, and only they can help you.
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...
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...
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...
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...
10 Jan 2019 by OriginalGriff
The only way to contact a member privately is to use the "Email" facit]lity on any forum message. So if he has replied to any message at the bottom of the article, then looking at his message may show "Reply·Email·View Thread | Edit·Delete" and clicking on "Email" will give you a new page to...
10 Jan 2019 by Sinisa Hajnal
Reply to the article and wait for a response. In the article there is usually (but not always) mail option (author may disable it). Finally, if you read the comments there may be a way to contact the author if someone already asked. As far as I know, there is no way to contact someone directly.
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(){} ...
23 Oct 2018 by saide_a
I want to use thread library, when the thread is member function of class assume I have 2 thread in a class What I have tried: class produceconsume { public: produceconsume(); virtual ~produceconsume(); thread producer() { return...
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;
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,...
29 Nov 2017 by ZurdoDev
Quote: a new table database for every new academic year that will start but apparently, it's too complex. No, you would just store the year as a filed within a table. Quote: The user will be asked to input their Student number name, contact details, and other basic information and also what...
2 May 2017 by ocean99
Hi all,I developed new website using asp.net membership for create new accounts register page run successfully on local machine and new user created , but when I host website ( free hosting on somee.com ) then I can not create new user account , and I get this exceptionA...
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...
14 Sep 2016 by Richard Deeming
With forms authentication, the only thing that's validated for each request is that the cookie contains a valid forms authentication ticket, and that the ticket has not expired.If you want to check that the ticket still represents a valid user in your membership store, then you need to add...
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...
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...
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...
24 May 2016 by Richard Deeming
Quote:I have provided the correct paramaters (username, newPassword, confirmPassword).According to the documentation[^], the parameters are: username, currentPassword, newPassword.You need to pass the user's current password as the second parameter. You are currently passing the user's new...
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...
6 May 2016 by Sergey Alexandrovich Kryukov
If this is "over your head" right now, I would recommend to stop at this point and invest your efforts in some other fields. If you get to this task closer, you will find a lot more issues "over your head", probably a lot more than you can imagine right now.Set aside obvious security issue,...
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...
21 Jan 2016 by Sergey Alexandrovich Kryukov
Please see my comment to the question.The key is: you are using cryptographic hash function calculated on passwords to store it for password-based authentication. And this is very good: you should never store passwords themselves. Only the user who created the password should know it, no one...
21 Jan 2016 by rizdplex
Hello,We have one ASP.NET web application which is build in .net framework 4.5 version. Currently on production this application is using SHA1 encrption alogorith.This alogorithm is set in "MachineKey" tag of application's web.config file. This applicaion uses Asp.Net Membership concept for...
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....
19 Jan 2016 by Vaidhya.P
There are so many tables in the Sqlmembershipsecurity , but only aspnet_UsersInRoles,Aspnet_Roles,Aspnet_User is used and only they are populated.How to user the remaining tables(aspnet_Profile,aspnet_Membership etc.. in the SQLMembershipSecurity:Requirment: To manage roles of the...
27 Nov 2015 by Peta2010
Hi Guys, I have client and he has approx 100K registered users visits per month on his wordpress site but currently it's still using old version of wordpress. He wants to redesign whole site using wordpress on responsive design, membership system, regular backups and polling for products...
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 =...
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. ...
13 Sep 2015 by swapnil_jadhav
Modify your web.config code as shown below: connectionString="Server=mssql.world19.server-world.net;Database=micro ;Uid=x123; Pwd=y123" /> ...
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.
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...
11 Sep 2015 by MohammadReza90
I'm trying to use membership in my ASP.Net project in VS2010.first: I create database with aspnet_regsql (with a custom name);second: in my web.config I wrote:
12 Aug 2015 by Suket shah
Hi,you are passing simply model to view that is incorrect"@model MvcApplication1.Models.RolesAndUser"you should pass model with (for bind list)@model IEnumerablefor more information visit...
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 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) { ...
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[^]
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.
28 Jun 2015 by Tukaram Kalane
The problem was with SqlMembership's Initialize method. When user logs in first time it calls initialize method & set connection string. When another user tries to login it uses the same connection string. that's why its not validating. If we try to call Initialize method It throws an exception...
24 Jun 2015 by Tukaram Kalane
Hello Everyone,My requirement of application is single application & multiple databases for each client. So I implemented custom membership to achieve this. First I check user belongs to which Client the according to connection string of that client's db I dynamically set connection string &...
30 Apr 2015 by HimaBindu Vejella
Use Fiddler to investigate further .
29 Apr 2015 by divyang4482
try to check what is cookies's domain name ( you may find in config file)
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...
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 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...
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 ...
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...
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[^]
8 Jan 2015 by RAHUL(10217975)
I am creating web application using .Net framework 3.5, I implemented asp.net membership (Forms Authentication), Now, What i want is when user session state is inactive then redirect page to Lockscreen.aspx and then user will enter details and continue work. After lot of search I have got...
27 Dec 2014 by Thebusker
Hello to all,my Hosting Provider don't allow to use the default user called "dbo" (on mssql 2008 server).I'm using the standard Membership in Visual Studio Express 2012 (or VS2010) for Registration and Login pages, but the Entity Framework/Membership .dll creates tables and vistas by "dbo"...
27 Dec 2014 by .Net Jim
Give this a try for some direction.[^]
27 Dec 2014 by sulekhabanerjee
Hi,I have used membership and roles in asp.net application.Step 1:- Created users and password through code in my database name "aspnetdb".Step 2:- The forms authentication tag and membership tag is available in my web.config file.I have used the hashed format settings for password in...
26 Dec 2014 by deepankarbhatnagar
Go to this link below for help,http://stackoverflow.com/questions/18570173/create-an-avatar-upload-form-for-users[^]
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...
8 Dec 2014 by Suraj Sahoo | Coding Passion
I think that can always be used.But MVC provides attributes like Authorize for providing authorization based on roles.And considering Authentication both forms and windows can be used for sure.But in MVC you can create Custom Authorize attributes. Check the links below:-Custom Forms...
8 Dec 2014 by sris 426
Hi,I am staring a new project in MVC4. Can I use asp.net membership provider for my authentication/authorization purpose. There are very few roles in application(max 5 roles). But there are premium and paid customers. we need to distinguish these users. Please suggest.Can I use a part of...
13 Nov 2014 by MT_
Hi,I just created a simple website with VS2010. It starts with built-in Login and SQL membership and authentication and all. I have kept same pages i.e. Login, Register that are created by Visual Studio.I just added some pages without touching any functionality related to...
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.
12 Nov 2014 by Seyed Ahmad Mirzaee
Hi alli want to use membership in asp.netwhen i open Asp.net Configuration Page i encounter with below errorAs a security measure, the Web Site Administration Tool times out after a period of inactivity. Changes to machine.config or web.config may also result in the tool needing to be...
9 Nov 2014 by Suraj Sahoo | Coding Passion
DotNet tricks[^]Extending Identity Accounts and Implementing Role-Based Authentication in ASP.NET MVC 5[^]A Beginner's Tutorial on Custom Forms Authentication in ASP.NET MVC Application[^]The above links are some very good links/articles on Authentication and authorization.These would...
4 Nov 2014 by sujithkumarsl
I am new to ASPNET Identity 2.0. I would like to know the way to customize Identity 2.0 to work with two databases. One db for authentication (like and IDP but I can query this db). Another one for authorization (role table). Any help?He the authentication table is the centralized Identity...
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...
1 Nov 2014 by Muhammad Taqi Hassan Bukhari
I am working on Asp.net Website that runs on .Net 4.5 and following the asp.net tutorials from msdn. When I paste any login control and click administer website, following error arises---------------------------Microsoft Visual Studio---------------------------Error invoking...
21 Oct 2014 by Muhammad Taqi Hassan Bukhari
I have a project to understand and modified. in this the developer is using asp.net membership provider for user registration purposes. I need to know which password encryption technique is using in this project.My web.config file is this.
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[^]
20 Oct 2014 by OriginalGriff
We do not condone, support or assist in the production of malicious code in any way, form or manner. This is a professional site for professional developers. And decrypting database passwords is almost certainly malicious: ask the owner / originator of the password what it is. You do have...
20 Oct 2014 by Muhammad Taqi Hassan Bukhari
I have a database in which user's password are stored as encrypted form using asp.net membership provider. here is the setting for membership in web.config
14 Sep 2014 by Sergey Alexandrovich Kryukov
Here is the universal manual for you on this and many other topics:Pass the beginner phase and look for the manual for non-beginner. Please understand: people are not interested to write everything for beginners; it would be just a waste of time of for both sides.These "beginner"...
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.
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...
10 Jul 2014 by Peter Leow
Did you forget to check the checkbox for the "I have read and agree to the Privacy Policy and Terms of Service for this site" statement? If the problem persists, you should post your question => http://www.codeproject.com/suggestions.aspx[^]
10 Jul 2014 by mathias&daddy
the button save my settings do not react when pressed ?
6 Jun 2014 by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
Peter is correct. If you still want to remove your account, then post at Bugs and Suggestions[^].
6 Jun 2014 by Peter Leow
This is your first question, yet it is about deletion of account. Sad! It is not advisable to withdraw, stay a bit longer and explore CP, browser the articles, check out the quick answers forum. You will love it. However, if you insist, reluctantly refer: CodeProject Member FAQ[^]
6 Jun 2014 by Member 8908718
Hi,I want to delete my account. Please..
30 Apr 2014 by Sajid Qayyum
Describes authentication management using cookies
20 Apr 2014 by ZainNabi
Can anyone point me to a tutorial or give me an online tutorial.Thank you
18 Apr 2014 by Sergey Alexandrovich Kryukov
Imaging you have a problem to create bonfire. You question is like asking: "Do you have a manual on striking a match?".—SA
14 Apr 2014 by Sampath Lokuge
As an another option, you can use Windows Azure to build Single Sign-On apps.Please read below article to know about that. Single Sign-On (Building Real-World Cloud Apps with Windows Azure)Another useful link : How to Implement Single Sign On in MVC4 Good Luck ! :)
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...
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
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.
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...
24 Feb 2014 by Maciej Los
Here is a proper board to ask above question: Site Bugs Suggestions[^]
11 Feb 2014 by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
Refer - 7 things to check to resolve “A network-related or instance-specific error occurred while establishing a connection to SQL Server…” [^].
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...
16 Jan 2014 by v03051435
found that, just in login page, useFormsAuthentication.SetAuthCookie(Login, false); // previously, i set true...now worked!Response.Redirect("~/WelcomPage.aspx",false);
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 =...
16 Jan 2014 by ♥…ЯҠ…♥
Hi,I think you need to clear the session at browser exit.You can refer this[^] link and this [^].Hope this helps you a bit.Regards,RK
16 Jan 2014 by Deviprasad Das
You need to rely on cookie for achieving this.