Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Session never expires

Reply
Thread Tools

Session never expires

 
 
Daniel Geisenhoff
Guest
Posts: n/a
 
      09-07-2004
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
 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      09-07-2004
Can you check the value of Session.IsNewSession?

Eliyahu

"Daniel Geisenhoff" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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



 
Reply With Quote
 
 
 
 
microteq
Guest
Posts: n/a
 
      09-07-2004


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!
 
Reply With Quote
 
microteq
Guest
Posts: n/a
 
      09-07-2004


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!
 
Reply With Quote
 
Eliyahu Goldin
Guest
Posts: n/a
 
      09-07-2004
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" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>
>
> 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!



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
You've never seen it before and you'll never see it again. Fred A Stover Computer Support 7 12-26-2007 03:33 AM
cache never expires fnustle@gmail.com ASP .Net 4 02-08-2007 03:04 AM
DMVPN ip NHRP never expires on remote end wonder Cisco 1 02-24-2006 03:48 PM
XML Schema never-never occurence of declared elements / attributes Soren Kuula XML 1 12-01-2005 01:27 PM
string routines go to never never land on unix Kevin C Programming 4 10-17-2003 06:07 PM



Advertisments