473,396 Members | 1,799 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,396 software developers and data experts.

How to set session timeout

Setting session timeout in web.config file does not seem
to have any effect. Any explanation or suggestion will be
appreciated.
Nov 17 '05 #1
12 43140
That would be the way to do it.

What makes you think that it is not working?

"Geigho" <ig******@zeonchemicals.com> wrote in message
news:0a****************************@phx.gbl...
Setting session timeout in web.config file does not seem
to have any effect. Any explanation or suggestion will be
appreciated.

Nov 17 '05 #2
That would be the way to do it.

What makes you think that it is not working?

"Geigho" <ig******@zeonchemicals.com> wrote in message
news:0a****************************@phx.gbl...
Setting session timeout in web.config file does not seem
to have any effect. Any explanation or suggestion will be
appreciated.

Nov 17 '05 #3
I am using a form based login. It does not matter what
value I set timeout to (e.g timeout="1", timeout="20",
timeout="120", etc), the application always takes me back
to the login form after approximately 20 minutes of not
posting the page back to the server.

<sessionState mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;user
id=sa;password=" cookieless="true" timeout="1" />
-----Original Message-----
That would be the way to do it.

What makes you think that it is not working?

"Geigho" <ig******@zeonchemicals.com> wrote in message
news:0a****************************@phx.gbl...
Setting session timeout in web.config file does not seem to have any effect. Any explanation or suggestion will be appreciated.

.

Nov 17 '05 #4
I am using a form based login. It does not matter what
value I set timeout to (e.g timeout="1", timeout="20",
timeout="120", etc), the application always takes me back
to the login form after approximately 20 minutes of not
posting the page back to the server.

<sessionState mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;user
id=sa;password=" cookieless="true" timeout="1" />
-----Original Message-----
That would be the way to do it.

What makes you think that it is not working?

"Geigho" <ig******@zeonchemicals.com> wrote in message
news:0a****************************@phx.gbl...
Setting session timeout in web.config file does not seem to have any effect. Any explanation or suggestion will be appreciated.

.

Nov 17 '05 #5
forms authentication and session state are not related.

youre forms authentication timeout specifies how long after a period of
inactivity should the user be taken back to the login page.

Session state just says how long to maintain session data for. If the
session timeout is shorter then the authentication timeout, the session data
will dissapear, but the user will still be authenticated, and thus not be
asked to relog in.

"geigho" <ig******@zeonchemicals.com> wrote in message
news:02****************************@phx.gbl...
I am using a form based login. It does not matter what
value I set timeout to (e.g timeout="1", timeout="20",
timeout="120", etc), the application always takes me back
to the login form after approximately 20 minutes of not
posting the page back to the server.

<sessionState mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;user
id=sa;password=" cookieless="true" timeout="1" />
-----Original Message-----
That would be the way to do it.

What makes you think that it is not working?

"Geigho" <ig******@zeonchemicals.com> wrote in message
news:0a****************************@phx.gbl...
Setting session timeout in web.config file does not seem to have any effect. Any explanation or suggestion will be appreciated.

.

Nov 17 '05 #6
forms authentication and session state are not related.

youre forms authentication timeout specifies how long after a period of
inactivity should the user be taken back to the login page.

Session state just says how long to maintain session data for. If the
session timeout is shorter then the authentication timeout, the session data
will dissapear, but the user will still be authenticated, and thus not be
asked to relog in.

"geigho" <ig******@zeonchemicals.com> wrote in message
news:02****************************@phx.gbl...
I am using a form based login. It does not matter what
value I set timeout to (e.g timeout="1", timeout="20",
timeout="120", etc), the application always takes me back
to the login form after approximately 20 minutes of not
posting the page back to the server.

<sessionState mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;user
id=sa;password=" cookieless="true" timeout="1" />
-----Original Message-----
That would be the way to do it.

What makes you think that it is not working?

"Geigho" <ig******@zeonchemicals.com> wrote in message
news:0a****************************@phx.gbl...
Setting session timeout in web.config file does not seem to have any effect. Any explanation or suggestion will be appreciated.

.

Nov 17 '05 #7
Thanks! But how do you set forms authentication timeout?
If I saved authentication flag in a session variable and
the session timed out, is the variable still available?
If not, then won't this cause the login page to be
redisplay since the authentication code (logic) cannot
read the value set in the session variable?
-----Original Message-----
forms authentication and session state are not related.

youre forms authentication timeout specifies how long after a period ofinactivity should the user be taken back to the login page.
Session state just says how long to maintain session data for. If thesession timeout is shorter then the authentication timeout, the session datawill dissapear, but the user will still be authenticated, and thus not beasked to relog in.

"geigho" <ig******@zeonchemicals.com> wrote in message
news:02****************************@phx.gbl...
I am using a form based login. It does not matter what
value I set timeout to (e.g timeout="1", timeout="20",
timeout="120", etc), the application always takes me back to the login form after approximately 20 minutes of not
posting the page back to the server.

<sessionState mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;user
id=sa;password=" cookieless="true" timeout="1" />
>-----Original Message-----
>That would be the way to do it.
>
>What makes you think that it is not working?
>
>"Geigho" <ig******@zeonchemicals.com> wrote in message
>news:0a****************************@phx.gbl...
>> Setting session timeout in web.config file does not

seem
>> to have any effect. Any explanation or suggestion
will be
>> appreciated.
>
>
>.
>

.

Nov 17 '05 #8
Thanks! But how do you set forms authentication timeout?
If I saved authentication flag in a session variable and
the session timed out, is the variable still available?
If not, then won't this cause the login page to be
redisplay since the authentication code (logic) cannot
read the value set in the session variable?
-----Original Message-----
forms authentication and session state are not related.

youre forms authentication timeout specifies how long after a period ofinactivity should the user be taken back to the login page.
Session state just says how long to maintain session data for. If thesession timeout is shorter then the authentication timeout, the session datawill dissapear, but the user will still be authenticated, and thus not beasked to relog in.

"geigho" <ig******@zeonchemicals.com> wrote in message
news:02****************************@phx.gbl...
I am using a form based login. It does not matter what
value I set timeout to (e.g timeout="1", timeout="20",
timeout="120", etc), the application always takes me back to the login form after approximately 20 minutes of not
posting the page back to the server.

<sessionState mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;user
id=sa;password=" cookieless="true" timeout="1" />
>-----Original Message-----
>That would be the way to do it.
>
>What makes you think that it is not working?
>
>"Geigho" <ig******@zeonchemicals.com> wrote in message
>news:0a****************************@phx.gbl...
>> Setting session timeout in web.config file does not

seem
>> to have any effect. Any explanation or suggestion
will be
>> appreciated.
>
>
>.
>

.

Nov 17 '05 #9
You set this value in the constructor for the
FormsAuthenticationTicket as shown below. After your user
is authenticated, try something like the following:

FormsAuthenticationTicket tkt;
string CookieStr;
HttpCookie ck;

// Create new Auth Ticket. Last argument authentication
timeout expressed in seconds.

SessionTimeout = 30; //Timeout in minutes

tkt = new FormsAuthenticationTicket(txtUserName.Text,
false, SessionTimeout * 60);

// Encrypt ticket
CookieStr = FormsAuthentication.Encrypt(tkt);

// Create the cookie
ck = new HttpCookie(FormsAuthentication.FormsCookieName,
CookieStr);

//Add cookie to HTTP header
Response.Cookies.Add(ck);

// Redirect to the main page
Response.Redirect("Default.htm", true);

HTH.

J. Ptak
-----Original Message-----
Thanks! But how do you set forms authentication timeout?
If I saved authentication flag in a session variable and
the session timed out, is the variable still available?
If not, then won't this cause the login page to be
redisplay since the authentication code (logic) cannot
read the value set in the session variable?
-----Original Message-----
forms authentication and session state are not related.

youre forms authentication timeout specifies how long

after a period of
inactivity should the user be taken back to the login

page.

Session state just says how long to maintain session

data for. If the
session timeout is shorter then the authentication

timeout, the session data
will dissapear, but the user will still be

authenticated, and thus not be
asked to relog in.

"geigho" <ig******@zeonchemicals.com> wrote in message
news:02****************************@phx.gbl...
I am using a form based login. It does not matter what
value I set timeout to (e.g timeout="1", timeout="20",
timeout="120", etc), the application always takes meback to the login form after approximately 20 minutes of not
posting the page back to the server.

<sessionState mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;user
id=sa;password=" cookieless="true" timeout="1" />

>-----Original Message-----
>That would be the way to do it.
>
>What makes you think that it is not working?
>
>"Geigho" <ig******@zeonchemicals.com> wrote in message
>news:0a****************************@phx.gbl...
>> Setting session timeout in web.config file does not
seem
>> to have any effect. Any explanation or suggestionwill be
>> appreciated.
>
>
>.
>

.

.

Nov 17 '05 #10
You set this value in the constructor for the
FormsAuthenticationTicket as shown below. After your user
is authenticated, try something like the following:

FormsAuthenticationTicket tkt;
string CookieStr;
HttpCookie ck;

// Create new Auth Ticket. Last argument authentication
timeout expressed in seconds.

SessionTimeout = 30; //Timeout in minutes

tkt = new FormsAuthenticationTicket(txtUserName.Text,
false, SessionTimeout * 60);

// Encrypt ticket
CookieStr = FormsAuthentication.Encrypt(tkt);

// Create the cookie
ck = new HttpCookie(FormsAuthentication.FormsCookieName,
CookieStr);

//Add cookie to HTTP header
Response.Cookies.Add(ck);

// Redirect to the main page
Response.Redirect("Default.htm", true);

HTH.

J. Ptak
-----Original Message-----
Thanks! But how do you set forms authentication timeout?
If I saved authentication flag in a session variable and
the session timed out, is the variable still available?
If not, then won't this cause the login page to be
redisplay since the authentication code (logic) cannot
read the value set in the session variable?
-----Original Message-----
forms authentication and session state are not related.

youre forms authentication timeout specifies how long

after a period of
inactivity should the user be taken back to the login

page.

Session state just says how long to maintain session

data for. If the
session timeout is shorter then the authentication

timeout, the session data
will dissapear, but the user will still be

authenticated, and thus not be
asked to relog in.

"geigho" <ig******@zeonchemicals.com> wrote in message
news:02****************************@phx.gbl...
I am using a form based login. It does not matter what
value I set timeout to (e.g timeout="1", timeout="20",
timeout="120", etc), the application always takes meback to the login form after approximately 20 minutes of not
posting the page back to the server.

<sessionState mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;user
id=sa;password=" cookieless="true" timeout="1" />

>-----Original Message-----
>That would be the way to do it.
>
>What makes you think that it is not working?
>
>"Geigho" <ig******@zeonchemicals.com> wrote in message
>news:0a****************************@phx.gbl...
>> Setting session timeout in web.config file does not
seem
>> to have any effect. Any explanation or suggestionwill be
>> appreciated.
>
>
>.
>

.

.

Nov 17 '05 #11
Thanks.

-----Original Message-----
You set this value in the constructor for the
FormsAuthenticationTicket as shown below. After your useris authenticated, try something like the following:

FormsAuthenticationTicket tkt;
string CookieStr;
HttpCookie ck;

// Create new Auth Ticket. Last argument authentication
timeout expressed in seconds.

SessionTimeout = 30; //Timeout in minutes

tkt = new FormsAuthenticationTicket(txtUserName.Text,
false, SessionTimeout * 60);

// Encrypt ticket
CookieStr = FormsAuthentication.Encrypt(tkt);

// Create the cookie
ck = new HttpCookie(FormsAuthentication.FormsCookieName,
CookieStr);

//Add cookie to HTTP header
Response.Cookies.Add(ck);

// Redirect to the main page
Response.Redirect("Default.htm", true);

HTH.

J. Ptak
-----Original Message-----
Thanks! But how do you set forms authentication timeout?
If I saved authentication flag in a session variable andthe session timed out, is the variable still available?
If not, then won't this cause the login page to be
redisplay since the authentication code (logic) cannot
read the value set in the session variable?
-----Original Message-----
forms authentication and session state are not related.

youre forms authentication timeout specifies how long

after a period of
inactivity should the user be taken back to the login

page.

Session state just says how long to maintain session

data for. If the
session timeout is shorter then the authentication

timeout, the session data
will dissapear, but the user will still be

authenticated, and thus not be
asked to relog in.

"geigho" <ig******@zeonchemicals.com> wrote in message
news:02****************************@phx.gbl.. .
I am using a form based login. It does not matter what value I set timeout to (e.g timeout="1", timeout="20", timeout="120", etc), the application always takes me

back
to the login form after approximately 20 minutes of not posting the page back to the server.

<sessionState mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;user
id=sa;password=" cookieless="true" timeout="1" />

>-----Original Message-----
>That would be the way to do it.
>
>What makes you think that it is not working?
>
>"Geigho" <ig******@zeonchemicals.com> wrote in message >news:0a****************************@phx.gbl...
>> Setting session timeout in web.config file does not seem
>> to have any effect. Any explanation or suggestion

will
be
>> appreciated.
>
>
>.
>
.

.

.

Nov 17 '05 #12
Thanks.

-----Original Message-----
You set this value in the constructor for the
FormsAuthenticationTicket as shown below. After your useris authenticated, try something like the following:

FormsAuthenticationTicket tkt;
string CookieStr;
HttpCookie ck;

// Create new Auth Ticket. Last argument authentication
timeout expressed in seconds.

SessionTimeout = 30; //Timeout in minutes

tkt = new FormsAuthenticationTicket(txtUserName.Text,
false, SessionTimeout * 60);

// Encrypt ticket
CookieStr = FormsAuthentication.Encrypt(tkt);

// Create the cookie
ck = new HttpCookie(FormsAuthentication.FormsCookieName,
CookieStr);

//Add cookie to HTTP header
Response.Cookies.Add(ck);

// Redirect to the main page
Response.Redirect("Default.htm", true);

HTH.

J. Ptak
-----Original Message-----
Thanks! But how do you set forms authentication timeout?
If I saved authentication flag in a session variable andthe session timed out, is the variable still available?
If not, then won't this cause the login page to be
redisplay since the authentication code (logic) cannot
read the value set in the session variable?
-----Original Message-----
forms authentication and session state are not related.

youre forms authentication timeout specifies how long

after a period of
inactivity should the user be taken back to the login

page.

Session state just says how long to maintain session

data for. If the
session timeout is shorter then the authentication

timeout, the session data
will dissapear, but the user will still be

authenticated, and thus not be
asked to relog in.

"geigho" <ig******@zeonchemicals.com> wrote in message
news:02****************************@phx.gbl.. .
I am using a form based login. It does not matter what value I set timeout to (e.g timeout="1", timeout="20", timeout="120", etc), the application always takes me

back
to the login form after approximately 20 minutes of not posting the page back to the server.

<sessionState mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;user
id=sa;password=" cookieless="true" timeout="1" />

>-----Original Message-----
>That would be the way to do it.
>
>What makes you think that it is not working?
>
>"Geigho" <ig******@zeonchemicals.com> wrote in message >news:0a****************************@phx.gbl...
>> Setting session timeout in web.config file does not seem
>> to have any effect. Any explanation or suggestion

will
be
>> appreciated.
>
>
>.
>
.

.

.

Nov 17 '05 #13

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

Similar topics

4
by: DavidS | last post by:
First: There are several ways to confuse one regarding session timeout. (1) web.config - <sessionState timeout="20"> (2) IIS Manager | Internet Information Services | ServerNode | Default Web Site...
8
by: Joe Abou Jaoude | last post by:
hi, I have a web app with forms authentication and a timeout session of 20 mins for security reasons. I recently added a feature that allows users (if they want to) to automatically log in...
8
by: bdeviled | last post by:
I am deploying to a web environment that uses load balancing and to insure that sessions persist across servers, the environment uses SQL to manage sessions. The machine.config file determines how...
17
by: jensen bredal | last post by:
Hello, i'm struggling with a somehow badly understood session scenario. I provide acces to my pages based on form authentication using Session cookies. Som of my pages are supposed to be...
2
by: Aryan | last post by:
Hi, I have put my session related parameter in web.config under system.web, given below is the code for same. <system.web> <sessionState timeout ="1440" mode ="InProc" /> </system.web> this...
4
by: UJ | last post by:
I have a page where the user can upload a video file. As you can guess, this may take a while. Is there a way I can change the session timeout for just this one page? I would also want to change...
25
by: =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= | last post by:
I tried: <sessionState timeout="1"> </sessionState> bounced IIS, and after 1 minute still had a session. ??? -- thanks - dave
3
by: trullock | last post by:
Hi, I want to test some session timeout code ive written but im getting a few problems. I want to reduce the session timeout to 1min so i dont have to wait around for 20 min to see if my code...
9
by: antonyliu2002 | last post by:
By default, IIS is configured to timeout a session in 20 minutes, which can be changed through the IIS config window. I use InProc sessionState mode. I can also set the session timeout in...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
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...

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.