Click here to Skip to main content
15,881,455 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am studying asp.net myself these days and i am really confused about how to make login page. i have checked plenty of codes on internet but at all are without session. some one told me that session is essential for login page please help. Do session are essential for login page. some of the demo require.
where the session variable values store in DB?
Posted
Updated 26-Jun-13 19:09pm
v2

Session is not mendatory for login page. If you use Forms Authentication[^],then there wont be any need to generate session.

:doh:[Edit]:
Login page without session[^]

Session is stored on server side. It have its own Adv. and disadv.

Advantages:

-It helps maintain user state and data all over the application.
-It is easy to implement and we can store any kind of object.
-Stores client data separately.
-Session is secure and transparent from the user.

Disadvantages:

-Performance overhead in case of large volumes of data/user, because session data is stored in server memory.
-Overhead involved in serializing and de-serializing session data, because in the case of StateServer and SQLServer session modes, we need to -Serialize the objects before storing them.

Further,session also have expiration behaviour,so you also have to take care of that.

Whereas,in forms authentication,on successful login,ticket will be generated and each time page postsback,this ticket will be verified to ensure the authorised user.

Feel free to ask if you still have any doubts.

Regards.. :laugh:
 
Share this answer
 
v5
Comments
Orcun Iyigun 27-Jun-13 2:41am    
My 5.
Thanks7872 27-Jun-13 2:42am    
Thanks Orcun..!
Hi,

Session is very important when you are making login functionality....
Session provides security to aspplication
When we logout from application then Session becomes clear and no other person can see our profile or our Data.....

Session provides identification also....

like WELCOME MR. XYZ....in our application.
Here sime of links ...visit it

http://www.devmanuals.com/tutorials/ms/aspdotnet/login.html[^]

http://forums.asp.net/t/1905217.aspx/1?login+with+admin+n+user+c+[^]
 
Share this answer
 
Session is easy and secure way for login;

Now, If your purpose is to store the login time log,
Then it is easy to store in one table with date time with user agent.

An If you are think of load balancing for webservers and SQL servers.
And your website is superiorly secure at that time you need to store session state in DataBase
For Ref :
http://support.microsoft.com/kb/317604[^]
 
Share this answer
 
v2
If you are new at the asp.net then please study the state management techniques posted in following blog
http://thakkermukund.wordpress.com/2013/06/27/state-management/[^]

It can give you idea of managing your user's state information by either ways.
 
Share this answer
 
Session not mandatory for login .
you can also use cookies to store login user information . Cookies will decrees the server load.
But cookies is not secure as session.Its your choice which to use . Nothing is mandatory.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900