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."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.
>
Showing posts with label inthe. Show all posts
Showing posts with label inthe. Show all posts
Saturday, March 31, 2012
Tuesday, March 13, 2012
Session variables and frames
hi Bonj,
You are confusing server side and client side, the Page_Load event occur in
the server side, the objects from the client side (frames, documents,
windows, etc ) do not exist.
If your header page decide the content of the main page you need to
implement that functionality there, you can do so in different ways, if the
page to load & its parameters are decided in the server, then you have to
send this info back to the browser, where a script can read it and set the
correct src of the main frame. the other way to do it is if when you load
the header you can decide what the possible source of main page will be you
can use LinkButtons for example with the correct properties value set.
regarding your doubs about global/session variables:
> If I use a global variable, will it be guaranteed to have a unique value
in the memory of the web server for each user?
there are not global variables, they need to be either in
Session/Application collections or as a static member of a class used, in
anyway its value will be shared among ALL the users of the application
> If I use a session variable, will it be reliable enough to be guaranteed
not to have been "relegated out of the session" by the time the property
between the <%= ... %> comes to read >it?
A session variable will exist as long as the session exist, it will never
happen that a variable exist when you start processing the page and timeout
before you finish processing it, the only way to end a session is either you
call Session.Abandon or a page is not requested in a given timeframe.
Hope this help,
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Bonj" <anonymous@dotnet.itags.org.discussions.microsoft.com> wrote in message
news:D773F097-099A-46C4-AB6A-B83E29CC3E83@dotnet.itags.org.microsoft.com...
> Hi
> I've got the following problem - I need to have an aspx page with two
frames, although the question isn't necessarily about the workings of the
frames, more session variables... the frames consist of one header (not
resizable) and one main (resizable). The source for the "main" page needs to
be of the form "WebForm3.aspx?..." with parameters to be determined at
runtime. I'm ok with this, I've gone down the route of putting
> src="http://pics.10026.com/?src=<%= MainPageToDisplay %>"
> but what about MainPageToDisplay - the info it needs to access can only be
decided in the Page_Load event - so I was wondering which out of a global
variable and a session variable are the most reliable to store this
information, for instance my dilemma is as such:
> If I use a global variable, will it be guaranteed to have a unique value
in the memory of the web server for each user?
> If I use a session variable, will it be reliable enough to be guaranteed
not to have been "relegated out of the session" by the time the property
between the <%= ... %> comes to read it?
> Thanks for any help, would really appreciate this one clearing up!
> Thanks.> regarding your doubs about global/session variables:
> in the memory of the web server for each user?
> there are not global variables, they need to be either in
> Session/Application collections or as a static member of a class used, in
> anyway its value will be shared among ALL the users of the application
Are the class member declared as static shared among ALL the users of
the application?
As far as I understand objects declared in a session scope shouldn't
be shared among ALL users.
Where can I read more info about it?
What should I do to declare and initialize object once per user and
this object shouldn't be shared among other users?
I'm going with it being undefined - i.e. can't guarantee them to be unique,
can't guarantee them to be shared.
You are confusing server side and client side, the Page_Load event occur in
the server side, the objects from the client side (frames, documents,
windows, etc ) do not exist.
If your header page decide the content of the main page you need to
implement that functionality there, you can do so in different ways, if the
page to load & its parameters are decided in the server, then you have to
send this info back to the browser, where a script can read it and set the
correct src of the main frame. the other way to do it is if when you load
the header you can decide what the possible source of main page will be you
can use LinkButtons for example with the correct properties value set.
regarding your doubs about global/session variables:
> If I use a global variable, will it be guaranteed to have a unique value
in the memory of the web server for each user?
there are not global variables, they need to be either in
Session/Application collections or as a static member of a class used, in
anyway its value will be shared among ALL the users of the application
> If I use a session variable, will it be reliable enough to be guaranteed
not to have been "relegated out of the session" by the time the property
between the <%= ... %> comes to read >it?
A session variable will exist as long as the session exist, it will never
happen that a variable exist when you start processing the page and timeout
before you finish processing it, the only way to end a session is either you
call Session.Abandon or a page is not requested in a given timeframe.
Hope this help,
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Bonj" <anonymous@dotnet.itags.org.discussions.microsoft.com> wrote in message
news:D773F097-099A-46C4-AB6A-B83E29CC3E83@dotnet.itags.org.microsoft.com...
> Hi
> I've got the following problem - I need to have an aspx page with two
frames, although the question isn't necessarily about the workings of the
frames, more session variables... the frames consist of one header (not
resizable) and one main (resizable). The source for the "main" page needs to
be of the form "WebForm3.aspx?..." with parameters to be determined at
runtime. I'm ok with this, I've gone down the route of putting
> src="http://pics.10026.com/?src=<%= MainPageToDisplay %>"
> but what about MainPageToDisplay - the info it needs to access can only be
decided in the Page_Load event - so I was wondering which out of a global
variable and a session variable are the most reliable to store this
information, for instance my dilemma is as such:
> If I use a global variable, will it be guaranteed to have a unique value
in the memory of the web server for each user?
> If I use a session variable, will it be reliable enough to be guaranteed
not to have been "relegated out of the session" by the time the property
between the <%= ... %> comes to read it?
> Thanks for any help, would really appreciate this one clearing up!
> Thanks.> regarding your doubs about global/session variables:
> in the memory of the web server for each user?
> there are not global variables, they need to be either in
> Session/Application collections or as a static member of a class used, in
> anyway its value will be shared among ALL the users of the application
Are the class member declared as static shared among ALL the users of
the application?
As far as I understand objects declared in a session scope shouldn't
be shared among ALL users.
Where can I read more info about it?
What should I do to declare and initialize object once per user and
this object shouldn't be shared among other users?
I'm going with it being undefined - i.e. can't guarantee them to be unique,
can't guarantee them to be shared.
Subscribe to:
Posts (Atom)