Thanks for your answers.
Now I understand I have to use setTimeout to achieve my goal.
The link http://www.crowes.f9.co.uk/Javascript/timer.htm is really helpful.
Which client side event I should use to keep track the user is still using
the website.
Thanks,
Benjamin
"Steve C. Orr [MVP, MCSD]" <Steve@dotnet.itags.org.Orr.net> wrote in message
news:#lv4LermEHA.324@dotnet.itags.org.TK2MSFTNGP11.phx.gbl...
> You could try using the javascript setTimeout function set to 20 minutes
> (the default session timeout period) and then set the
> document.location.href='login.aspx' via client side code.
> Here's an example of using the javascript setTimeout function:
> http://www.crowes.f9.co.uk/Javascript/timer.htm
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://Steve.Orr.net
>
> "Benjamin Smith" <BenSmithNg@dotnet.itags.org.hotmail.com> wrote in message
> news:%23%23YjkXrmEHA.3608@dotnet.itags.org.TK2MSFTNGP09.phx.gbl...
visible
the
>The browser will keep track of that for you.
All you need is one client side event to fire once the trigger time has
elapsed and you want to warn the user.
You can name the event anything you want.
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"Benjamin" <BenSmithNg@.hotmail.com> wrote in message
news:uan1PfQnEHA.392@.tk2msftngp13.phx.gbl...
> Thanks for your answers.
> Now I understand I have to use setTimeout to achieve my goal.
> The link http://www.crowes.f9.co.uk/Javascript/timer.htm is really
> helpful.
> Which client side event I should use to keep track the user is still using
> the website.
> Thanks,
> Benjamin
>
> "Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
> news:#lv4LermEHA.324@.TK2MSFTNGP11.phx.gbl...
> visible
> the
>
The event would be the TimeOut Interval triggering the function that
setTimeOut refers to.
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
"Steve C. Orr [MVP, MCSD]" <Steve@.Orr.net> wrote in message
news:#wwlJFRnEHA.3868@.TK2MSFTNGP11.phx.gbl...
> The browser will keep track of that for you.
> All you need is one client side event to fire once the trigger time has
> elapsed and you want to warn the user.
> You can name the event anything you want.
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://Steve.Orr.net
>
> "Benjamin" <BenSmithNg@.hotmail.com> wrote in message
> news:uan1PfQnEHA.392@.tk2msftngp13.phx.gbl...
using
minutes
page.
>
Showing posts with label link. Show all posts
Showing posts with label link. Show all posts
Saturday, March 31, 2012
Session Timeout..
Monday, March 26, 2012
session variable getting lost
Thank you for your reply and the article link.
I am currently investigating George's suggestion as well
S
""Walter Wang [MSFT]"" <wawang@dotnet.itags.org.online.microsoft.com> wrote in message
news:RatUSdeIIHA.4268@dotnet.itags.org.TK2MSFTNGHUB02.phx.gbl...
> Hi SAL,
> Regarding difference between Response.Redirect and Server.Transfer, I
> think
> following page is useful for your reference. Each approach has its own
> pros
> and cons.
> #Response.Redirect vs Server.Transfer
> [url]http://haacked.com/archive/2004/10/06/responseredirectverseservertransfer.as[/ur
l]
> px
> Back to the original issue about losing session after Redirect, I think
> George's suggestion is quite helpful.
>
> Regards,
> Walter Wang (wawang@dotnet.itags.org.online.microsoft.com, remove 'online.')
> Microsoft Online Community Support
> ========================================
==========
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ========================================
==========
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>"SAL" <SAL@.nospam.nospam> wrote in
news:uFUwqXiIIHA.6108@.TK2MSFTNGP03.phx.gbl:
> Thank you for your reply and the article link.
> I am currently investigating George's suggestion as well
Please post back here if (and when) you find the culprit.
I have stopped using sesion variables altogether becuase of
similar issues on a client's server, but am very interested
in what you figure out.
Now my client may well be changing the web.config file
which will cause the application to restart, all the more
reason to not use session varialbes (in my case).
Instead I pass info encrypted in the query string, which
works just fine, the only session variable I use is to
relay error messages to tan error page - if that gets
lost, oh well.
kpg
kpg,
what I figured out was the app was getting recycled due to a limit I had set
on virtual memory. There are times when the virtual memory usage jumps up
dramatically and then it pops right back down. The app does not appear to be
leaking memory at this time. So, I unchecked that option in the App pool's
configuration.
I used information garnered from this link to aid me in my quest, although I
haven't completely implemented Peter's Exception Engine.
http://www.eggheadcafe.com/articles/20030816.asp
I placed this code in my Application_Error routine in my Global.asax file:
Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
' Code that runs when an unhandled error occurs
' check to see if the ASPNETApplication log exists
Dim b As Boolean
Try
b =
Convert.ToBoolean(ConfigurationManager.AppSettings("logAppErrors"))
Catch ex As Exception
End Try
If Not b Then Exit Sub
If Not System.Diagnostics.EventLog. _
SourceExists("AnnexationTrackerApplication") Then
System.Diagnostics.EventLog. _
CreateEventSource("AnnexationTrackerApplication",
"Application")
End If
System.Diagnostics.EventLog. _
WriteEntry("AnnexationTrackerApplication",
Server.GetLastError().GetBaseException().Message)
End Sub
The message appeared in the system event log not the application event log.
HTH
S
"kpg*" <no@.spam.com> wrote in message
news:Xns99E27E9E22F89ipostthereforeiam@.2
07.46.248.16...
> "SAL" <SAL@.nospam.nospam> wrote in
> news:uFUwqXiIIHA.6108@.TK2MSFTNGP03.phx.gbl:
>
> Please post back here if (and when) you find the culprit.
> I have stopped using sesion variables altogether becuase of
> similar issues on a client's server, but am very interested
> in what you figure out.
> Now my client may well be changing the web.config file
> which will cause the application to restart, all the more
> reason to not use session varialbes (in my case).
> Instead I pass info encrypted in the query string, which
> works just fine, the only session variable I use is to
> relay error messages to tan error page - if that gets
> lost, oh well.
> kpg
I am currently investigating George's suggestion as well
S
""Walter Wang [MSFT]"" <wawang@dotnet.itags.org.online.microsoft.com> wrote in message
news:RatUSdeIIHA.4268@dotnet.itags.org.TK2MSFTNGHUB02.phx.gbl...
> Hi SAL,
> Regarding difference between Response.Redirect and Server.Transfer, I
> think
> following page is useful for your reference. Each approach has its own
> pros
> and cons.
> #Response.Redirect vs Server.Transfer
> [url]http://haacked.com/archive/2004/10/06/responseredirectverseservertransfer.as[/ur
l]
> px
> Back to the original issue about losing session after Redirect, I think
> George's suggestion is quite helpful.
>
> Regards,
> Walter Wang (wawang@dotnet.itags.org.online.microsoft.com, remove 'online.')
> Microsoft Online Community Support
> ========================================
==========
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ========================================
==========
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>"SAL" <SAL@.nospam.nospam> wrote in
news:uFUwqXiIIHA.6108@.TK2MSFTNGP03.phx.gbl:
> Thank you for your reply and the article link.
> I am currently investigating George's suggestion as well
Please post back here if (and when) you find the culprit.
I have stopped using sesion variables altogether becuase of
similar issues on a client's server, but am very interested
in what you figure out.
Now my client may well be changing the web.config file
which will cause the application to restart, all the more
reason to not use session varialbes (in my case).
Instead I pass info encrypted in the query string, which
works just fine, the only session variable I use is to
relay error messages to tan error page - if that gets
lost, oh well.
kpg
kpg,
what I figured out was the app was getting recycled due to a limit I had set
on virtual memory. There are times when the virtual memory usage jumps up
dramatically and then it pops right back down. The app does not appear to be
leaking memory at this time. So, I unchecked that option in the App pool's
configuration.
I used information garnered from this link to aid me in my quest, although I
haven't completely implemented Peter's Exception Engine.
http://www.eggheadcafe.com/articles/20030816.asp
I placed this code in my Application_Error routine in my Global.asax file:
Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
' Code that runs when an unhandled error occurs
' check to see if the ASPNETApplication log exists
Dim b As Boolean
Try
b =
Convert.ToBoolean(ConfigurationManager.AppSettings("logAppErrors"))
Catch ex As Exception
End Try
If Not b Then Exit Sub
If Not System.Diagnostics.EventLog. _
SourceExists("AnnexationTrackerApplication") Then
System.Diagnostics.EventLog. _
CreateEventSource("AnnexationTrackerApplication",
"Application")
End If
System.Diagnostics.EventLog. _
WriteEntry("AnnexationTrackerApplication",
Server.GetLastError().GetBaseException().Message)
End Sub
The message appeared in the system event log not the application event log.
HTH
S
"kpg*" <no@.spam.com> wrote in message
news:Xns99E27E9E22F89ipostthereforeiam@.2
07.46.248.16...
> "SAL" <SAL@.nospam.nospam> wrote in
> news:uFUwqXiIIHA.6108@.TK2MSFTNGP03.phx.gbl:
>
> Please post back here if (and when) you find the culprit.
> I have stopped using sesion variables altogether becuase of
> similar issues on a client's server, but am very interested
> in what you figure out.
> Now my client may well be changing the web.config file
> which will cause the application to restart, all the more
> reason to not use session varialbes (in my case).
> Instead I pass info encrypted in the query string, which
> works just fine, the only session variable I use is to
> relay error messages to tan error page - if that gets
> lost, oh well.
> kpg
Thursday, March 22, 2012
Session VAriables
If I declare a session variable: session("Link") and
later code: session("Link") = Nothing, will that free up
the space taken up by the variable? Or do you have to
abanden the session?
ThanksSession.Remove("Link")
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
"brian" <bshannon@.lbrspec.com> wrote in message
news:143cf01c3f7f6$fd4d6870$a501280a@.phx.gbl...
> If I declare a session variable: session("Link") and
> later code: session("Link") = Nothing, will that free up
> the space taken up by the variable? Or do you have to
> abanden the session?
> Thanks
You can use the Session.Contents.Remove method to delete a single value.
The following MSDN link has more details:
http://msdn.microsoft.com/library/d...-us/iissdk/iis/
ref_vbom_sesomcr.asp
HTH
Chris [MSFT]
-------
>Content-Class: urn:content-classes:message
>From: "brian" <bshannon@.lbrspec.com>
>Sender: "brian" <bshannon@.lbrspec.com>
>Subject: Session VAriables
>Date: Fri, 20 Feb 2004 13:17:48 -0800
>Lines: 6
>Message-ID: <143cf01c3f7f6$fd4d6870$a501280a@.phx.gbl>
>MIME-Version: 1.0
>Content-Type: text/plain;
>charset="iso-8859-1"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>Thread-Index: AcP39v1LHCGeXncVT1qlfO3A0gmTfw==
>Newsgroups: microsoft.public.dotnet.framework.aspnet
>Path: cpmsftngxa07.phx.gbl
>Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.aspnet:211898
>NNTP-Posting-Host: tk2msftngxa13.phx.gbl 10.40.1.165
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
>If I declare a session variable: session("Link") and
>later code: session("Link") = Nothing, will that free up
>the space taken up by the variable? Or do you have to
>abanden the session?
>Thanks
hi,
there is also SEssion.Clear()
will clear the values of that keyname.
Session.abandon is the best bet... though
--
Thanks and Regards,
Amit Agarwal
Software Programmer(.NET)
"brian" <bshannon@.lbrspec.com> wrote in message
news:143cf01c3f7f6$fd4d6870$a501280a@.phx.gbl...
> If I declare a session variable: session("Link") and
> later code: session("Link") = Nothing, will that free up
> the space taken up by the variable? Or do you have to
> abanden the session?
> Thanks
--
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.593 / Virus Database: 376 - Release Date: 2/20/2004
later code: session("Link") = Nothing, will that free up
the space taken up by the variable? Or do you have to
abanden the session?
ThanksSession.Remove("Link")
--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
"brian" <bshannon@.lbrspec.com> wrote in message
news:143cf01c3f7f6$fd4d6870$a501280a@.phx.gbl...
> If I declare a session variable: session("Link") and
> later code: session("Link") = Nothing, will that free up
> the space taken up by the variable? Or do you have to
> abanden the session?
> Thanks
You can use the Session.Contents.Remove method to delete a single value.
The following MSDN link has more details:
http://msdn.microsoft.com/library/d...-us/iissdk/iis/
ref_vbom_sesomcr.asp
HTH
Chris [MSFT]
-------
>Content-Class: urn:content-classes:message
>From: "brian" <bshannon@.lbrspec.com>
>Sender: "brian" <bshannon@.lbrspec.com>
>Subject: Session VAriables
>Date: Fri, 20 Feb 2004 13:17:48 -0800
>Lines: 6
>Message-ID: <143cf01c3f7f6$fd4d6870$a501280a@.phx.gbl>
>MIME-Version: 1.0
>Content-Type: text/plain;
>charset="iso-8859-1"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>Thread-Index: AcP39v1LHCGeXncVT1qlfO3A0gmTfw==
>Newsgroups: microsoft.public.dotnet.framework.aspnet
>Path: cpmsftngxa07.phx.gbl
>Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.aspnet:211898
>NNTP-Posting-Host: tk2msftngxa13.phx.gbl 10.40.1.165
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
>If I declare a session variable: session("Link") and
>later code: session("Link") = Nothing, will that free up
>the space taken up by the variable? Or do you have to
>abanden the session?
>Thanks
hi,
there is also SEssion.Clear()
will clear the values of that keyname.
Session.abandon is the best bet... though
--
Thanks and Regards,
Amit Agarwal
Software Programmer(.NET)
"brian" <bshannon@.lbrspec.com> wrote in message
news:143cf01c3f7f6$fd4d6870$a501280a@.phx.gbl...
> If I declare a session variable: session("Link") and
> later code: session("Link") = Nothing, will that free up
> the space taken up by the variable? Or do you have to
> abanden the session?
> Thanks
--
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.593 / Virus Database: 376 - Release Date: 2/20/2004
Subscribe to:
Posts (Atom)