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

Session Timeout

Hi, everyone,

I need the web application's session to expire after 20 minutes and I added
this in the web.config file but it is not working. I was able to go onto
the default.aspx page after a couple of days that I haven't logged on and I
was not prompted to. Any suggestions? Thanks
<authentication mode="Forms">

<forms name="logincookie" loginUrl="login.aspx" protection="All"
timeout="20"/>

</authentication>
Jul 2 '06 #1
7 2215
Antonio,

Are you sure this is a matter of the session timing out? How do you
know that this is not the result of an authentication cookie being placed on
your machine to identify you. I would bet if you looked at the session ids,
they are different.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Antonio" <in**@awfulcards.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
Hi, everyone,

I need the web application's session to expire after 20 minutes and I
added this in the web.config file but it is not working. I was able to go
onto the default.aspx page after a couple of days that I haven't logged on
and I was not prompted to. Any suggestions? Thanks
<authentication mode="Forms">

<forms name="logincookie" loginUrl="login.aspx" protection="All"
timeout="20"/>

</authentication>


Jul 2 '06 #2
Hi, Nicholas, thank you for replying. I am not saving the sessions in a
table, I would like people to log onto the web app and after 20 minutes
being challenged again with a login.

Oh, so, I have to save the session so that there is a time start and end for
the app to compare, don't I ?

Antonio
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote in
message news:%2****************@TK2MSFTNGP05.phx.gbl...
Antonio,

Are you sure this is a matter of the session timing out? How do you
know that this is not the result of an authentication cookie being placed
on your machine to identify you. I would bet if you looked at the session
ids, they are different.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Antonio" <in**@awfulcards.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>Hi, everyone,

I need the web application's session to expire after 20 minutes and I
added this in the web.config file but it is not working. I was able to
go onto the default.aspx page after a couple of days that I haven't
logged on and I was not prompted to. Any suggestions? Thanks
<authentication mode="Forms">

<forms name="logincookie" loginUrl="login.aspx" protection="All"
timeout="20"/>

</authentication>



Jul 2 '06 #3
Antonio,

You don't have to save the session id necessarily. Just prevent your
app from allowing people to log on automatically based on cookie information
that they might have on their machine.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Antonio" <in**@awfulcards.comwrote in message
news:OX**************@TK2MSFTNGP03.phx.gbl...
Hi, Nicholas, thank you for replying. I am not saving the sessions in a
table, I would like people to log onto the web app and after 20 minutes
being challenged again with a login.

Oh, so, I have to save the session so that there is a time start and end
for the app to compare, don't I ?

Antonio
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote
in message news:%2****************@TK2MSFTNGP05.phx.gbl...
>Antonio,

Are you sure this is a matter of the session timing out? How do you
know that this is not the result of an authentication cookie being placed
on your machine to identify you. I would bet if you looked at the
session ids, they are different.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Antonio" <in**@awfulcards.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>>Hi, everyone,

I need the web application's session to expire after 20 minutes and I
added this in the web.config file but it is not working. I was able to
go onto the default.aspx page after a couple of days that I haven't
logged on and I was not prompted to. Any suggestions? Thanks
<authentication mode="Forms">

<forms name="logincookie" loginUrl="login.aspx" protection="All"
timeout="20"/>

</authentication>




Jul 2 '06 #4
Well, is the section in the web.config enough?
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote in
message news:ez*************@TK2MSFTNGP05.phx.gbl...
Antonio,

You don't have to save the session id necessarily. Just prevent your
app from allowing people to log on automatically based on cookie
information that they might have on their machine.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Antonio" <in**@awfulcards.comwrote in message
news:OX**************@TK2MSFTNGP03.phx.gbl...
>Hi, Nicholas, thank you for replying. I am not saving the sessions in a
table, I would like people to log onto the web app and after 20 minutes
being challenged again with a login.

Oh, so, I have to save the session so that there is a time start and end
for the app to compare, don't I ?

Antonio
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote
in message news:%2****************@TK2MSFTNGP05.phx.gbl...
>>Antonio,

Are you sure this is a matter of the session timing out? How do you
know that this is not the result of an authentication cookie being
placed on your machine to identify you. I would bet if you looked at
the session ids, they are different.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Antonio" <in**@awfulcards.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl.. .
Hi, everyone,

I need the web application's session to expire after 20 minutes and I
added this in the web.config file but it is not working. I was able to
go onto the default.aspx page after a couple of days that I haven't
logged on and I was not prompted to. Any suggestions? Thanks
<authentication mode="Forms">

<forms name="logincookie" loginUrl="login.aspx" protection="All"
timeout="20"/>

</authentication>




Jul 2 '06 #5
Antonio,
You are confusing FormsAuthentication ticket (cookie) timeout with ASP.NET
SessionID ( also a cookie) timeout. They are two separate and distinct things.

Read up on the way to set up your Forms Authentication cookie Name and
expiration policy in your web.config file. You can also set the properties
programmatically with the FormsAuthentication class.

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Antonio" wrote:
Hi, everyone,

I need the web application's session to expire after 20 minutes and I added
this in the web.config file but it is not working. I was able to go onto
the default.aspx page after a couple of days that I haven't logged on and I
was not prompted to. Any suggestions? Thanks
<authentication mode="Forms">

<forms name="logincookie" loginUrl="login.aspx" protection="All"
timeout="20"/>

</authentication>
Jul 2 '06 #6
Thank you Peter. Can you tell me where I can find more information? I only
read the MS VS C#.net step by step and they only had the section in the
web.config file.

Antonio

"Peter Bromberg [C# MVP]" <pb*******@yahoo.nospammin.comwrote in message
news:25**********************************@microsof t.com...
Antonio,
You are confusing FormsAuthentication ticket (cookie) timeout with ASP.NET
SessionID ( also a cookie) timeout. They are two separate and distinct
things.

Read up on the way to set up your Forms Authentication cookie Name and
expiration policy in your web.config file. You can also set the properties
programmatically with the FormsAuthentication class.

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Antonio" wrote:
>Hi, everyone,

I need the web application's session to expire after 20 minutes and I
added
this in the web.config file but it is not working. I was able to go onto
the default.aspx page after a couple of days that I haven't logged on and
I
was not prompted to. Any suggestions? Thanks
<authentication mode="Forms">

<forms name="logincookie" loginUrl="login.aspx" protection="All"
timeout="20"/>

</authentication>

Jul 2 '06 #7
Antonio,
All of this kind of "stuff" is covered extensively in the MSDN Library
online documentation, as well as the Visual Studio / .NET Framework help
files that install with the product. You have to get used to the process of
looking this stuff up for yourself or you will be spending all your time
making posts to newsgroups and waiting around for answers.
Here's a link to the MSDN2 member list for the FormsAuthentication class:

http://msdn2.microsoft.com/en-us/lib...n_members.aspx

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Antonio" wrote:
Thank you Peter. Can you tell me where I can find more information? I only
read the MS VS C#.net step by step and they only had the section in the
web.config file.

Antonio

"Peter Bromberg [C# MVP]" <pb*******@yahoo.nospammin.comwrote in message
news:25**********************************@microsof t.com...
Antonio,
You are confusing FormsAuthentication ticket (cookie) timeout with ASP.NET
SessionID ( also a cookie) timeout. They are two separate and distinct
things.

Read up on the way to set up your Forms Authentication cookie Name and
expiration policy in your web.config file. You can also set the properties
programmatically with the FormsAuthentication class.

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Antonio" wrote:
Hi, everyone,

I need the web application's session to expire after 20 minutes and I
added
this in the web.config file but it is not working. I was able to go onto
the default.aspx page after a couple of days that I haven't logged on and
I
was not prompted to. Any suggestions? Thanks
<authentication mode="Forms">

<forms name="logincookie" loginUrl="login.aspx" protection="All"
timeout="20"/>

</authentication>


Jul 3 '06 #8

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

Similar topics

12
by: Geigho | last post by:
Setting session timeout in web.config file does not seem to have any effect. Any explanation or suggestion will be appreciated.
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...
11
by: Vishal | last post by:
Hello, can anybody tell me how I can extend the session expiry time? Is it done via code or via IIS? Sorry I am new and dont know about this.
5
by: Just D. | last post by:
Do we have any access to the Session object from a different Session? The idea is to save Session of a current user and then if he logs in again then return the Session back. It's not a problem to...
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...
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
6
by: ChrisAtWokingham | last post by:
I have been struggling with unexpected error messages on an ASP.NET system, using SQL and C#. The application draws organisation charts, based on data stored in the SQL database. Some of the chart...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
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
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...

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.