Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET Login page

Tags:

asp.net

I want to add login for registered users in my website. How shall I proceed with it? Is it through the use of sessions? What will happen to the Session variable once the logout happens??

like image 380
Roshan Avatar asked Feb 01 '26 17:02

Roshan


2 Answers

Your question is extremely broad and there are many different ways that you can implement what is, in effect, a "membership" system for an ASP.NET website.

I would suggest that you start by reading the "Introduction to Membership" article from MSDN. This article will give you an overview of how ASP.NET membership works in the most "standard" way.

It also mentions using the various ASP.NET membership "controls" (Login, LoginView, LoginStatus & PasswordRecovery for example).

Using these controls along with the built-in ASP.NET membership providers (for example, ASP.NET provides a SQL membership provider to work against SQL Server as the data store for your user accounts and credentials) will allow you to implement a complete membership and authentication system with virtually no code at all (i.e. all the functionality is provided by the built-in "membership" controls and declarative mark-up).

Finally, a really good series of articles on this subject is:

Examining ASP.NET 2.0's Membership, Roles, and Profile

from the 4guysfromrolla site. It's starts at the very beginning of the membership topic and goes right the way through to touching on the implementation of a custom membership provider and administrative interface for managing user credentials to round out the whole subject.

like image 55
CraigTP Avatar answered Feb 04 '26 05:02

CraigTP


I'd take a look a related questions, such as

Login Membership .NET

This topic is already covered quite a lot on SO.

Session state and log in are somewhat orthogonal. You have a session regardless of whether or not you are logged in.

like image 42
Steve Avatar answered Feb 04 '26 06:02

Steve



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!