ASP QUESTION

H

Hermione

Hello

Is it possible to know if the session of the client is ended or no
I don't have a (.asa) on my web site because the web server fournisser
doesn't accept it.

What I need

After 30 minute of logging I want the session to end ( or test if the
session is end) and redirect the client to a new page

Thanks
 
K

Kevin Spencer

If the Session ends, the client is no longer around. The Session ends after
a period of 20 minutes without a client Request. You will not be able to
Redirect anything when the Session ends.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Everybody picks their nose,
But some people are better at hiding it.
 
H

Hermione

Hi Kevin

Thanks for your response

Is it possible to me to know if the session ends?

Thanks

"Kevin Spencer" a écrit :
 
K

Kevin Spencer

Sure, if you have a global.asa file in your web. But there isn't anything
you can do with it anyway. As I said, the page is already on the client, and
you can't redirect or anything else on the client.

If you want to do a redirect when the Session ends, you can try using a
client-side META Refresh tag that does the redirect on the client after 19
minutes. The default Session length is 20 minutes, but if you need to
redirect prior to the Session ending, you should test this and make sure, as
it is configurable on the web server. If you don't care about the Session
ending, and want to redirect after 30 minutes (well after the Session has
ended), you can use a 30-minute interval in your META Refresh tag. Example:

<html>
<head>
....
<meta http-equiv="refresh" content="1800;url=http://www.takempis.com/">
....
</head>

The "1800" is the number of seconds to delay. 1800 is 30 * 60.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Expect the unaccepted.
 
S

Stefan B Rusynko

Agree that knowing if a session has ended is problematic
(once it is ended you know nothing, too many things reset it)
But w/o a global.asa you can still start a session for a fixed time (say 30 min) using the Session.Timeout
See http://www.aspfaq.com/show.asp?id=2066
And attempt to do something just before the timeout (if the user is still there)
See http://www.aspfaq.com/show.asp?id=2265




| Sure, if you have a global.asa file in your web. But there isn't anything
| you can do with it anyway. As I said, the page is already on the client, and
| you can't redirect or anything else on the client.
|
| If you want to do a redirect when the Session ends, you can try using a
| client-side META Refresh tag that does the redirect on the client after 19
| minutes. The default Session length is 20 minutes, but if you need to
| redirect prior to the Session ending, you should test this and make sure, as
| it is configurable on the web server. If you don't care about the Session
| ending, and want to redirect after 30 minutes (well after the Session has
| ended), you can use a 30-minute interval in your META Refresh tag. Example:
|
| <html>
| <head>
| ...
| <meta http-equiv="refresh" content="1800;url=http://www.takempis.com/">
| ...
| </head>
|
| The "1800" is the number of seconds to delay. 1800 is 30 * 60.
|
| --
| HTH,
|
| Kevin Spencer
| Microsoft MVP
| .Net Developer
| Expect the unaccepted.
|
| | > Hi Kevin
| >
| > Thanks for your response
| >
| > Is it possible to me to know if the session ends?
| >
| > Thanks
| >
| > "Kevin Spencer" a écrit :
| >
| >> If the Session ends, the client is no longer around. The Session ends
| >> after
| >> a period of 20 minutes without a client Request. You will not be able to
| >> Redirect anything when the Session ends.
| >>
| >> --
| >> HTH,
| >>
| >> Kevin Spencer
| >> Microsoft MVP
| >> ..Net Developer
| >> Everybody picks their nose,
| >> But some people are better at hiding it.
| >>
| >> | >> > Hello
| >> >
| >> > Is it possible to know if the session of the client is ended or no
| >> > I don't have a (.asa) on my web site because the web server fournisser
| >> > doesn't accept it.
| >> >
| >> > What I need
| >> >
| >> > After 30 minute of logging I want the session to end ( or test if the
| >> > session is end) and redirect the client to a new page
| >> >
| >> > Thanks
| >> >
| >> >
| >>
| >>
| >>
|
|
 
K

Kevin Spencer

Hi Stefan,

The solution to the Session Timeout issue you posted is another client-side
way of doing what I was talking about with the META Refresh tag, but using
JavaScript. However, the Refresh tag would prolong the Session, by sending a
new request to the Server, unless it refreshes after the Session ends.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Expect the unaccepted.
 
K

Kevin Spencer

But w/o a global.asa you can still start a session for a fixed time (say
30 min) using the Session.Timeout
See http://www.aspfaq.com/show.asp?id=2066

As for prolonging the Session, this is generally something to be avoided, as
Sessions consume resources (memory) on the server. It can be problematic
when traffic increases.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Expect the unaccepted.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top