473,473 Members | 1,875 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Session State Question?

Is it a good idea to load a user username/email and password into session
state if you will be validating information against those credential
through-out the use of the web application? or is it best or more secure to
just get that information from the database when needed?
Nov 16 '05 #1
3 1228
You would probably want to check the user credentials during the login
process, and then store a session variable saying that the user is
logged on. You would want to check that session variable on each page,
or in a common user control or master page.

Something like:

Session["LoggedOn"] = true;

That's the way that I do it.

Lowell

Leon wrote:
Is it a good idea to load a user username/email and password into session
state if you will be validating information against those credential
through-out the use of the web application? or is it best or more secure to
just get that information from the database when needed?

Nov 16 '05 #2
Exactly, that's the way I do it also, but to give the user more
personalization you would won't to store things such as the user Name,
email, etc. within session state right? However, is it secure to store to
store a user password with session state (yes/no--why)? Thanks!!!

"Lowell Heddings" <lo****@mindjunction.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
You would probably want to check the user credentials during the login
process, and then store a session variable saying that the user is logged
on. You would want to check that session variable on each page, or in a
common user control or master page.

Something like:

Session["LoggedOn"] = true;

That's the way that I do it.

Lowell

Leon wrote:
Is it a good idea to load a user username/email and password into session
state if you will be validating information against those credential
through-out the use of the web application? or is it best or more secure
to just get that information from the database when needed?

Nov 16 '05 #3
Just as a general practice, I wouldn't store the user password in the
session state. There's also no real good reason to do so either.

What I generally do is store the user full name and other information
from my database tables into a UserInfo class object that I store in a
session variable. I can then use any of the properties for customization
that I need to throughout the application.

But, there is just about never a reason to store the user password in a
session object in order to accomplish that.

Lowell

Leon wrote:
Exactly, that's the way I do it also, but to give the user more
personalization you would won't to store things such as the user Name,
email, etc. within session state right? However, is it secure to store to
store a user password with session state (yes/no--why)? Thanks!!!

"Lowell Heddings" <lo****@mindjunction.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
You would probably want to check the user credentials during the login
process, and then store a session variable saying that the user is logged
on. You would want to check that session variable on each page, or in a
common user control or master page.

Something like:

Session["LoggedOn"] = true;

That's the way that I do it.

Lowell

Leon wrote:
Is it a good idea to load a user username/email and password into session
state if you will be validating information against those credential
through-out the use of the web application? or is it best or more secure
to just get that information from the database when needed?


Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jeff Smythe | last post by:
I simply want to execute some code once when a new session of my ASP.NET application is started (I'm not using session state for anything else - just writing some data to a database). I thought...
10
by: tshad | last post by:
I have been using the default session state (InProc) and have found that I have been loosing my information after a period of time (normally 20 minutes). Is there anyway to find out how much...
2
by: Kevin Frey | last post by:
Hello, I've been reading that ASP.NET serialises (ie. processes one at a time) HTTP requests if two simultaneous requests need to access the same session state. It also makes note that ASP.NET...
2
by: DC | last post by:
Hi, we are using ASP.Net 1.1 on eight servers with one session state server (the windows 2003 service). Too often we are getting the exception "Unable to make the session state request to the...
14
by: GaryDean | last post by:
The web.config in my asp.net application, running on Server2003, has this entry: <sessionState mode="InProc" timeout="40". In IIS the asp.net State Management timeout setting is 40 for my website....
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.