Saturday, March 31, 2012
Session Timeout, not working
the web.config(120 minutes for testing) after 20 minutes to 30 minutes
click a button and am redirected back to the login. My Session is
reporting 120 minutes I know this becuase I display on a debug page.
below are the 2 areas in the web.config that I set anybody tell me
whats wrong or what is missing.
<sessionState mode="InProc" regenerateExpiredSessionId="false"
timeout="120">
</sessionState>
<forms name=".GSNAUTH" loginUrl="Login.aspx" path="/"
protection="Encryption" timeout="120" slidingExpiration="true"/>
When previeing on the page I see the top 1 becuase I have been able
to adjust it down to 60 minutes or 35 minutes whatever.
When I display on the debug page I show
lblSessionTimeout.text = Session.Timeout;
NOt sure what I am missing."Scott" <sremiger@.groceryshopping.net> wrote in message
news:47b0bb72-a003-4f59-9e19-fb5cbe61e720@.o77g2000hsf.googlegroups.com...
> I have set the session timeout something greater then 20 minutes in
> the web.config(120 minutes for testing) after 20 minutes to 30 minutes
> click a button and am redirected back to the login. My Session is
> reporting 120 minutes I know this becuase I display on a debug page.
> below are the 2 areas in the web.config that I set anybody tell me
> whats wrong or what is missing.
> <sessionState mode="InProc" regenerateExpiredSessionId="false"
> timeout="120">
> </sessionState>
> <forms name=".GSNAUTH" loginUrl="Login.aspx" path="/"
> protection="Encryption" timeout="120" slidingExpiration="true"/>
> When previeing on the page I see the top 1 becuase I have been able
> to adjust it down to 60 minutes or 35 minutes whatever.
> When I display on the debug page I show
> lblSessionTimeout.text = Session.Timeout;
> NOt sure what I am missing.
Unless you have other clients creating activity on the site your Application
Pool is probably timing out. When a pool has seen absolutely no activity
whatsoever it can shutdown. Check the settings on the pool to which your
application belongs.
Anthony Jones - MVP ASP/ASP.NET
Session expiration and forms authentication timeouts are two separate and
distinct things. Being redirected to a login page is a forms authentication
timeout issue, unless somehow you are also using session to do this.
Your ASP.NET application can recycle for any number of reasons, and when it
does, all inProc Sessions go bye-bye.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: htp://petesbloggerama.blogspot.com
Short Urls & more: http://ittyurl.net
"Scott" wrote:
> I have set the session timeout something greater then 20 minutes in
> the web.config(120 minutes for testing) after 20 minutes to 30 minutes
> click a button and am redirected back to the login. My Session is
> reporting 120 minutes I know this becuase I display on a debug page.
> below are the 2 areas in the web.config that I set anybody tell me
> whats wrong or what is missing.
> <sessionState mode="InProc" regenerateExpiredSessionId="false"
> timeout="120">
> </sessionState>
> <forms name=".GSNAUTH" loginUrl="Login.aspx" path="/"
> protection="Encryption" timeout="120" slidingExpiration="true"/>
> When previeing on the page I see the top 1 becuase I have been able
> to adjust it down to 60 minutes or 35 minutes whatever.
> When I display on the debug page I show
> lblSessionTimeout.text = Session.Timeout;
> NOt sure what I am missing.
>
Session Timeouts
Is it the one in IIS (900 seconds)
Machine.config (20 mins)
or
Web.config (20 mins)
Could someone explain how this works.
Or is it IIS just because that ends first?
Thanksasp.net does not use the IIS session - these are for classic asp
true session timeout only occurs with the inproc session manager running in
your app domain. for its configuration it defaults to machine.config, but
web.config overrides it , like all settings (unless overriding
machine.config has been disabled).
-- bruce (sqlwork.com)
"BillGatesFan" <klj_mcsd@.hotmail.com> wrote in message
news:1103664141.963104.39250@.z14g2000cwz.googlegroups.com...
| Which Session Timeout property is used by default.
|
| Is it the one in IIS (900 seconds)
|
| Machine.config (20 mins)
|
| or
|
| Web.config (20 mins)
|
| Could someone explain how this works.
| Or is it IIS just because that ends first?
|
| Thanks
|
BillGatesFan..
I have also asked this question once..
But after my research..i think Web.Config..overrides all of them.
Patrick
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!
Session Timeouts
Is it the one in IIS (900 seconds)
Machine.config (20 mins)
or
Web.config (20 mins)
Could someone explain how this works.
Or is it IIS just because that ends first?
Thanksasp.net does not use the IIS session - these are for classic asp
true session timeout only occurs with the inproc session manager running in
your app domain. for its configuration it defaults to machine.config, but
web.config overrides it , like all settings (unless overriding
machine.config has been disabled).
-- bruce (sqlwork.com)
"BillGatesFan" <klj_mcsd@.hotmail.com> wrote in message
news:1103664141.963104.39250@.z14g2000cwz.googlegro ups.com...
| Which Session Timeout property is used by default.
|
| Is it the one in IIS (900 seconds)
|
| Machine.config (20 mins)
|
| or
|
| Web.config (20 mins)
|
| Could someone explain how this works.
| Or is it IIS just because that ends first?
|
| Thanks
|
BillGatesFan..
I have also asked this question once..
But after my research..i think Web.Config..overrides all of them.
Patrick
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Session times out too soon...
My web.config session setting is timeout=20, but in code we set the timeout
to override this to some user preference, often 40 minutes, (specified by
the user in seconds). But even in fairly active sessions, (ones where post
are done every 5 minutes or less), we still have session timing out.
Whether either the 20 minute or 40 minute value is in effect, I never wait
more than 5 minutes between posts back to the server (doing real work) so I
would NOT expect a session timeout.
Does anybody have any ideas about how to track this down? Are others having
similar results? Do I need to provide more data to make sense?
Thanks in advance for your time. I've been in software for 20+ years, but
new to ASP.NET. Our actual ASP.NET developers are baffled too.
Thanks! Sincerely,
James Hunter Ross
Senior Software Developer
O'Neil Software, Inc.
james.ross@dotnet.itags.org.oneilsoft.comJames Hunter Ross wrote:
> Friends,
> My web.config session setting is timeout=20, but in code we set the
> timeout to override this to some user preference, often 40 minutes,
> (specified by the user in seconds). But even in fairly active
> sessions, (ones where post are done every 5 minutes or less), we
> still have session timing out. Whether either the 20 minute or 40
> minute value is in effect, I never wait more than 5 minutes between
> posts back to the server (doing real work) so I would NOT expect a
> session timeout.
If you really are seeing Session loss (instead of something else that only
looks like Session loss), the most common cause would be an app domain
restart, assuming you are using InProc Session state.
Check the ASP.NET v1.1.4322 object in perfmon. There is a counter for
Application Restarts. Monitor that when you lose Session. If it increments
at the same time, your app domain recycling is causing the problem.
The most common cause of app domain restarts is file change notifications.
That would be caused by anti-virus or something else scanning the
application or from someone changing the web.config in the root folder or
something in the bin.
--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com
FrontPage add-ins for FrontPage 2000 - 2003
I also experienced this issue and found Jim's post regarding
sessionState mode to be helpful.
I changed my sessionState mode from the default inproc to StateServer.
Of course, this is one of those situations where, after the change, I'm
waiting for the application to, uh, NOT break. But so far so good.
One question I had for Jim is about perfmon. This looks like a really
neat tool - I just wish I knew how to use it.
When you say to 'Check the ASP.NET v1.1.4322 object in perfmon' - how
does one do that?
Cheers,
Robert Meyer
ISG
http://www.isgcom.com
*** Sent via Developersdex http://www.developersdex.com ***
Robert Meyer wrote:
> When you say to 'Check the ASP.NET v1.1.4322 object in perfmon' - how
> does one do that?
Hi Robert,
Perfmon (Performance) is in Administrative Tools. When you launch it,
choose "ASP.NET v1.1.4322" from the object dropdown. That will populate the
Counter and Instance listboxes. Choose "Application Restarts" from the
Counter listbox and then choose your process (or Global) from the instance
listbox. Then click Add and then Close.
Now you will have an item in the listbox at the bottom of Perfmon for
Application Restarts. If you select it, you'll see a graph representation
and numeric values for that counter. If you see that increment when your
problem occurs, you'll know it was because of an app domain restart.
--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com
Session times out too soon...
My web.config session setting is timeout=20, but in code we set the timeout
to override this to some user preference, often 40 minutes, (specified by
the user in seconds). But even in fairly active sessions, (ones where post
are done every 5 minutes or less), we still have session timing out.
Whether either the 20 minute or 40 minute value is in effect, I never wait
more than 5 minutes between posts back to the server (doing real work) so I
would NOT expect a session timeout.
Does anybody have any ideas about how to track this down? Are others having
similar results? Do I need to provide more data to make sense?
Thanks in advance for your time. I've been in software for 20+ years, but
new to ASP.NET. Our actual ASP.NET developers are baffled too.
Thanks! Sincerely,
James Hunter Ross
Senior Software Developer
O'Neil Software, Inc.
james.ross@dotnet.itags.org.oneilsoft.comJames Hunter Ross wrote:
> Friends,
> My web.config session setting is timeout=20, but in code we set the
> timeout to override this to some user preference, often 40 minutes,
> (specified by the user in seconds). But even in fairly active
> sessions, (ones where post are done every 5 minutes or less), we
> still have session timing out. Whether either the 20 minute or 40
> minute value is in effect, I never wait more than 5 minutes between
> posts back to the server (doing real work) so I would NOT expect a
> session timeout.
If you really are seeing Session loss (instead of something else that only
looks like Session loss), the most common cause would be an app domain
restart, assuming you are using InProc Session state.
Check the ASP.NET v1.1.4322 object in perfmon. There is a counter for
Application Restarts. Monitor that when you lose Session. If it increments
at the same time, your app domain recycling is causing the problem.
The most common cause of app domain restarts is file change notifications.
That would be caused by anti-virus or something else scanning the
application or from someone changing the web.config in the root folder or
something in the bin.
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com
FrontPage add-ins for FrontPage 2000 - 2003
I also experienced this issue and found Jim's post regarding
sessionState mode to be helpful.
I changed my sessionState mode from the default inproc to StateServer.
Of course, this is one of those situations where, after the change, I'm
waiting for the application to, uh, NOT break. But so far so good.
One question I had for Jim is about perfmon. This looks like a really
neat tool - I just wish I knew how to use it.
When you say to 'Check the ASP.NET v1.1.4322 object in perfmon' - how
does one do that?
Cheers,
Robert Meyer
ISG
http://www.isgcom.com
*** Sent via Developersdex http://www.examnotes.net ***
Robert Meyer wrote:
> When you say to 'Check the ASP.NET v1.1.4322 object in perfmon' - how
> does one do that?
>
Hi Robert,
Perfmon (Performance) is in Administrative Tools. When you launch it,
choose "ASP.NET v1.1.4322" from the object dropdown. That will populate the
Counter and Instance listboxes. Choose "Application Restarts" from the
Counter listbox and then choose your process (or Global) from the instance
listbox. Then click Add and then Close.
Now you will have an item in the listbox at the bottom of Perfmon for
Application Restarts. If you select it, you'll see a graph representation
and numeric values for that counter. If you see that increment when your
problem occurs, you'll know it was because of an app domain restart.
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com
Session timing problem
I add an object to session (Session.Add()) and set the session timeout in the web.config for 20 minutes however it seems to lose the session after 5 minutes (well before 20 minutes) or after a few refreshes of the page.
any ideas how I can keep the session alive for longer fully until the time specified in the web.config?Might be a problem with the ASP.NET worker process. Check your Event Viewer first to see if W3WP or any related processes have errored out, which may be causing the worker process to recycle (therefore ending the session)
i doubt that is the issue as the same problem happens when i upload it to my web hosting server. :)
Session tracked via URL in ASP.NET
I have my asp.net web application to track session id across pages using the url, and not cookies, ie in the web.config file:
<sessionState .... cookieless="true" ...... />
however each link in the page does not embed the id in the url like it is supposed to :
<a href="http://links.10026.com/?link=http://mywebserver/(rqe4ptb333ojxz3kh1t3xqr3)/mypage.aspx"> my link </a>
and so each page i travel to, a new session id is created in the url and the information associated with the previous page's session id is lost.
can anybody tell me what else i need to do to make this work?
thank you,
Kenton Taylorfor some reason the .net framework will not insert the session id before rendering the HTML if your HREF uses a "/" to denote that the path is relative to the root
this will work:
href="http://myserver/home.aspx"
as will this:
href="home.aspx"
but this won't:
href="/home.aspx"