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

Session never expires

Hi,

we have set our session timeout in web.config and in IIS to 1 minute,
but the session never expires. We check a variable Session("UserId")
in global.asax, which is still valid after 10 minutes.

here is our code in global.asax:

Private Sub Global_AcquireRequestState(ByVal sender As Object, ByVal e
As System.EventArgs) Handles MyBase.AcquireRequestState
If Not LCase(Request.Path).EndsWith("default.aspx") And _
Not LCase(Request.Path).EndsWith("frontdoor.aspx") Then
If Session("UserId") Is Nothing Then
Response.Redirect("frontdoor.aspx", True)
End If
End If
End Sub

and this is our session state part in web.config:

<sessionState
mode="SQLServer"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data
source=PIII550;Trusted_Connection=no;uid=sa;pwd=xx xxx"
cookieless="true"
timeout="1"
/>

We know that form authentication would be a better approach for this
purpose, but forms authentication does not work if a browser blocks
cookies.

Does anyone have an idea?

Many thanks in advance.
Daniel Geisenhoff
Nov 18 '05 #1
4 7988
Can you check the value of Session.IsNewSession?

Eliyahu

"Daniel Geisenhoff" <dg*********@microteq.ch> wrote in message
news:27**************************@posting.google.c om...
Hi,

we have set our session timeout in web.config and in IIS to 1 minute,
but the session never expires. We check a variable Session("UserId")
in global.asax, which is still valid after 10 minutes.

here is our code in global.asax:

Private Sub Global_AcquireRequestState(ByVal sender As Object, ByVal e
As System.EventArgs) Handles MyBase.AcquireRequestState
If Not LCase(Request.Path).EndsWith("default.aspx") And _
Not LCase(Request.Path).EndsWith("frontdoor.aspx") Then
If Session("UserId") Is Nothing Then
Response.Redirect("frontdoor.aspx", True)
End If
End If
End Sub

and this is our session state part in web.config:

<sessionState
mode="SQLServer"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data
source=PIII550;Trusted_Connection=no;uid=sa;pwd=xx xxx"
cookieless="true"
timeout="1"
/>

We know that form authentication would be a better approach for this
purpose, but forms authentication does not work if a browser blocks
cookies.

Does anyone have an idea?

Many thanks in advance.
Daniel Geisenhoff

Nov 18 '05 #2


After 5 minutes, the session.isnewsession is still false.

Thanks.
Daniel

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3
Daniel,

Note that the session timeout refers to the inactivity time. If you are
serving requests all the time, the session will never expire. Are you sure
no requests arrive within your timeout period?

Eliyahu

"microteq" <mi******@devdex.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...


After 5 minutes, the session.isnewsession is still false.

Thanks.
Daniel

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #4


As I am the only user, I am quite sure of that.

Or can I serve requests without explicitely posting my page?

Thanks.
Daniel.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #5

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

Similar topics

3
by: PM | last post by:
I'm trying to make a kind of search history containing the 3 last searched words. So I'm using 3 Session Variables: Word1 / Word2 / Word3. In order to get this history working, I need to put the...
12
by: chrism | last post by:
Hello, I have a pop-up window that I would like to appear in front of the browser home page when a user opens IE. Problem is, I'd like it to never appear again if the user navigates back to the...
1
by: Jenn | last post by:
I have done alot of web work in all sorts of languages but I have never used the simple cookie. Question is How does one set and retrieve a simple session cookie. All it will do is have an image...
11
by: Jennifer | last post by:
Is there a way to check for to see if the user has session cookies enabled? I know how to check to see if they have cookies in general enabled, but how do you test for just session cookies? ...
3
by: Enoch Chan | last post by:
I would like to set a Session variable to a value. In Vbscript it should be Session("ZoomValue")=500 How can I set this session variable by using Javascript? Thanks
12
by: ACaunter | last post by:
Hi all, I was wondering how i could write some code which would automatically open the Login Page once the session has expired? -- AdamPC@hotmail.com
14
by: Martin Walke | last post by:
Hi all, Is there any limit to the number of session variables a site can have? And is that affected by global.asa at all? The reason why i ask is that i have a relatively simple site that...
4
by: mike.biang | last post by:
I have an ASP page that is using an XMLHTTP object to request various pages from my server. I keep a single session throughout the XMLHTTP requests by bassing the ASPSESSIONID cookie through the...
4
by: rgparkins | last post by:
Hello I am running out of time with a problem I have running PHP 5.04 and Apache 2.0 and really need help :(. I have a page that stores a variable in session but each time I reload that page the...
0
by: Aarchaic | last post by:
Hello i have problem my session variables seem to disapear as i go along i've created this code to ilustrate whats happening First off i just post 3 detials like a name a age and a favourite...
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
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...
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
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...
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.