Hi
There's no login page in the software. New session is created for every new
user from "HttpContext.Current.Session.SessionID". This SessionID is used
for loading and saving user dependent session data (for
ex."HttpContext.Current.Session["UserDependentVariable_1"]").
I can see that the session is still running because the SessionID is still
the same and all user dependent data is still in session. When I change to
another page in the software after about 20 minutes, the SessionID has been
changed. Session data is also empty - of course.
I have now changed the SessionState's mode to "StateServer". I have read
from the Web that it's not as buggy as "InProc". Still no effect in my
software.
My problem is that there is a need that the session lasts hours - not 20
minutes. I have changed SessionState's timeout to "120" in Web.config and
Machine.config. I also found setting from IIS: Web page Properties >>
Configuration... >> Options: Enable session state, Session timeout. I
changed also this to 120. Still the session is lost after about 20 minutes.
I have tried to find answer to this from the Web. I haven't found any answer
yet but I have found many other programmers who have faced the same problem:
Sessions just don't last long. Is there any way to get over this?
Regards
Mikko
"Paul Glavich [MVP - ASP.NET]" <gl**@aspalliance.com-NOSPAM> wrote in
message news:%2***************@TK2MSFTNGP15.phx.gbl...
How are you determining that the session is still running? Is it just that
you dont go back to the login page or something like that?
--
- Paul Glavich
Microsoft MVP - ASP.NET
"Mikko Penkkimäki" <mp******@hotmail.com> wrote in message
news:41***********************@news.song.fi... Hi
Looks like I can not change Web page's timeout setting. In practise it's
all the time 20 minutes - no matter what I do.
I have this kind of setting in web.config:
<sessionState
mode="InProc"
cookieless="true"
timeout="1"
/>
With this settings program goes to Global.asax's Session_End() function
after 1 minute but the session is still running after this. It's only
after 20 minutes when the session really stops.
I have tried to change the timeout setting in Machine.config also >> No
difference.
I have even booted my computer after I have made change to the setting -
just in case if something is still running in memory. >> No help.
That 20 minutes settings has to be somewhere hidden, but where? Couldn't
find it from IIS either.
I have Windows XP Pro and Visual Studio .NET 2003.
Please help me.
Regards
Mikko