473,406 Members | 2,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Is SessionState timeout the same as login timeout

Does the SessionState timeout field in Web.config control how long a logged in
session will stay logged in?

For example, I want my users to be able to log in once during their work day and for
their log-ins to remain valid for 12 hours. Is this below the way to do it?

<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="7200"
/>

(ignore the stateConnectionString and sqlConnectionString which I do not even
understand at this moment)

Does the timeout="7200" mean 7200 seconds from the time of logging in that the
Session object will be deleted from the ASP.Net server and hence that the user will
no longer be logged on?

Or, to put it another way: If the browser cookie lasts longer than the session object
does the user have to log back in if the session object expires but the browser
cookie still exists?

I want to add some setting to the session object and/or browser cookie that control
what fields are available on web pages based on what I find in a log-in database
table record when I check the username and password. Can I add those fields to the
cookie that gets created when the user logs in?
Dec 6 '05 #1
1 2453
Basically the session state means that the users session data will remain
active for in your case 7200 seconds after the user's last request to the
server.

So for example:

7200 = 12 Hours
3600 = 6 hours
60 = 1 hour

I browse your web site @ 1am, I do nothing more and my session now does not
expire until 1pm
I browse your web site @ 1am and browse around until 2am, now your session
does not expire until 2pm

Session state is used when you want to store some details for the particular
user:

Something like this:

Session["UserName"] = Chris
Session["UserID"] = 1234

So it is not a period of time after they logged in for example but the
amount of time after the last request before those session variables are
cleared from the servers memory.
--

Cheers

Chris Crowe [IIS MVP 1997 -> 2006]
http://blog.crowe.co.nz
------------------------------------------------
"Randall Parker" <NOtechieSPAMpundit_please@future_avoidjunk_pundit .com>
wrote in message news:e3****************@TK2MSFTNGP15.phx.gbl...
Does the SessionState timeout field in Web.config control how long a
logged in session will stay logged in?

For example, I want my users to be able to log in once during their work
day and for their log-ins to remain valid for 12 hours. Is this below the
way to do it?

<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data
source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="7200"
/>

(ignore the stateConnectionString and sqlConnectionString which I do not
even understand at this moment)

Does the timeout="7200" mean 7200 seconds from the time of logging in that
the Session object will be deleted from the ASP.Net server and hence that
the user will no longer be logged on?

Or, to put it another way: If the browser cookie lasts longer than the
session object does the user have to log back in if the session object
expires but the browser cookie still exists?

I want to add some setting to the session object and/or browser cookie
that control what fields are available on web pages based on what I find
in a log-in database table record when I check the username and password.
Can I add those fields to the cookie that gets created when the user logs
in?

Dec 6 '05 #2

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

Similar topics

7
by: Jack | last post by:
Hi, In my application, the main page is accessed via a login screen. A particular record is accessed based on the value of login page. Everything works fine. However, if this screen is kept idle...
0
by: Kristofer Liljeblad | last post by:
Hi, I've successfully setup my machine to use: sessionState mode="SQLServer". All is up and running so no problems so far. Because I curious person, I started to play around with the two new...
3
by: Kenny | last post by:
Hi , I have created two Web Application - WebApplication1 and WebApplication2 in same machine for testing purpose. e.g http://localhost/WebApplication1.aspx...
3
by: Carpe Diem | last post by:
Hello I have an aspx page that loses Session("user") value after a few minutes even after I set <sessionState mode="InProc" cookieless="false" timeout="300"> in web.config and wrote function...
5
by: Mikko Penkkimäki | last post by:
Hi Looks like I can not change Web page's timeout setting. In practise it's all the time 20 minutes - no matter what I do. I have this kind of setting in web.config: <sessionState...
4
by: VB Programmer | last post by:
When I run my ASP.NET 2.0 web app on my dev machine it works perfect. When I precomile it to my web deployment project and then copy the debug files to my web server I get this problem when trying...
0
by: Mr Ideas Man | last post by:
Hi all, Relating to a post i made earlier... I am deploying a asp.net app to my web host. They assure me that the directory i am copying my files to is configured as an IIS Application. ...
2
by: ravisingh11 | last post by:
<authentication mode="Forms"> <forms loginUrl="Login.aspx" protection="All" timeout="30" cookieless="AutoDetect" /> </authentication> Over here we can specify cookiless to be auto detect so...
0
by: Nick K. | last post by:
We have an ASP.Net 2.0 web application that uses cookies for the sessionState. We have a login page that the user initially logs into and when the sessionState expires. I tracked down all that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.