Hi all
when i log onto my asp.net website through a browser , the session variables
are expiring way too quickly. if i leave the screen for only a minute,
everything is gone.
it seems like some pages are worse than others...
the session timeout is set to 20mins, but still they are expiring after only
a minute...
what should i do'
--
AdamPC@dotnet.itags.org.hotmail.comread my resonse to the first post you made on this one... lots of stuff out
there.
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"ACaunter" <AdamPC@.hotmail.com> wrote in message
news:73D329BF-E42C-465A-B9BF-864327266347@.microsoft.com...
> Hi all
> when i log onto my asp.net website through a browser , the session
> variables
> are expiring way too quickly. if i leave the screen for only a minute,
> everything is gone.
> it seems like some pages are worse than others...
> the session timeout is set to 20mins, but still they are expiring after
> only
> a minute...
> what should i do'
> --
> AdamPC@.hotmail.com
Showing posts with label expiring. Show all posts
Showing posts with label expiring. Show all posts
Monday, March 26, 2012
session variable expire too quickly
Hi all
when i log onto my asp.net website through a browser , the session variables
are expiring way too quickly. if i leave the screen for only a minute,
everything is gone.
it seems like some pages are worse than others...
the session timeout is set to 20mins, but still they are expiring after only
a minute...
when i log onto my asp.net website through a browser , the session variables
are expiring way too quickly. if i leave the screen for only a minute,
everything is gone.
it seems like some pages are worse than others...
the session timeout is set to 20mins, but still they are expiring after only
a minute...
what should i do??
--
AdamPC@dotnet.itags.org.hotmail.comread my resonse to the first post you made on this one... lots of stuff out
there.
--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"ACaunter" <AdamPC@.hotmail.com> wrote in message
news:73D329BF-E42C-465A-B9BF-864327266347@.microsoft.com...
> Hi all
> when i log onto my asp.net website through a browser , the session
> variables
> are expiring way too quickly. if i leave the screen for only a minute,
> everything is gone.
> it seems like some pages are worse than others...
> the session timeout is set to 20mins, but still they are expiring after
> only
> a minute...
> what should i do??
> --
> AdamPC@.hotmail.com
Thursday, March 22, 2012
session variables
Hi,
I am having a strange thing happen.. my session variables are expiring after only a few minutes, even though I have set them to expire in 30 minutes in my web.config and in my IIS.
The site is working using forms-based authentication and the auth cookie seems to last.. its just the session variables that disappear quickly!
any ideas?
thanks, rich.Just to check,
The timeout for both the auth cookie and the session variables are set in different places in the web config file.
yes, i've set them both to timeout in 30 minutes..
however, sometimes the session variables just disappear after a few minutes.
i should maybe ask.. when does a new session start? if you close IE and re-open then you'll have a new session, right?
but, what if you keep the same IE open, browse to somewhere else in the same site (using the absolute address) and then come back.. does the session expire??
thanks!
richard.
No the session doesnt expire if you stay on the same site.
there could be many reasons your session expired. Can your IE take cookies, I dont think its the HOST IIS that is the problem as that is overriden by your web.config file. Did you set your session variables properly ?
well.. i think i am declaring them correctly:
Session("User_ID") = 5
and then later, intUserID = Integer.Parse(Session("User_ID"))
they just sometimes disappear.. what's strange is that if the session is expired, then it should redirect the user to the login page again shouldnt it ?
I think you are misunderstanding both issues
The session Cookie ID issued by the forms Authentication is different from the session variables. If the Forms Auth Cookie expires longer, or are persistant, you will not be redirected to your login page
i think i do understanding the issues..
as i said in my initial posting, i set both the timeout of the session and the auth cookie to 30 minutes.. that is why i was surprised that the session was timing out, but not the auth cookie.
what else might cause a session variable to expire (other than time)?
I am having a strange thing happen.. my session variables are expiring after only a few minutes, even though I have set them to expire in 30 minutes in my web.config and in my IIS.
The site is working using forms-based authentication and the auth cookie seems to last.. its just the session variables that disappear quickly!
any ideas?
thanks, rich.Just to check,
The timeout for both the auth cookie and the session variables are set in different places in the web config file.
yes, i've set them both to timeout in 30 minutes..
however, sometimes the session variables just disappear after a few minutes.
i should maybe ask.. when does a new session start? if you close IE and re-open then you'll have a new session, right?
but, what if you keep the same IE open, browse to somewhere else in the same site (using the absolute address) and then come back.. does the session expire??
thanks!
richard.
No the session doesnt expire if you stay on the same site.
there could be many reasons your session expired. Can your IE take cookies, I dont think its the HOST IIS that is the problem as that is overriden by your web.config file. Did you set your session variables properly ?
well.. i think i am declaring them correctly:
Session("User_ID") = 5
and then later, intUserID = Integer.Parse(Session("User_ID"))
they just sometimes disappear.. what's strange is that if the session is expired, then it should redirect the user to the login page again shouldnt it ?
I think you are misunderstanding both issues
The session Cookie ID issued by the forms Authentication is different from the session variables. If the Forms Auth Cookie expires longer, or are persistant, you will not be redirected to your login page
i think i do understanding the issues..
as i said in my initial posting, i set both the timeout of the session and the auth cookie to 30 minutes.. that is why i was surprised that the session was timing out, but not the auth cookie.
what else might cause a session variable to expire (other than time)?
Subscribe to:
Posts (Atom)