PDA

View Full Version : Show active sessions


bruce
09-26-2003, 06:14 AM
ASP session should work just fine.

What do you mean by it not working?

[b]quote:Originally posted by Frank42

I am trying to show the number of active sessions. The code I am using works localy but does not after its uploaded. Is there some security issue that will prevent the session information from being displayed
here is a sample of the code.
<%
dim tAccessTime
tAccessTime = session("lastAccessTime")

if tAccessTime = " " then
Response.write ("First Time <p>")
else
response.write ("Last Accessed at " & tAccessTime & "<P>")
end if
%>
[b]
<%= Session("VisitorID")%>
</B>total visits Since Reboot
[b]
[b]
<%= Application("Active")%>
</B>active visitors.
<% session ("LastAccesstime") = now %>
</blockquote id="quote"></font id="quote">

Frank42
09-26-2003, 07:57 AM
this is how it looks when I go to the page

Last Accessed at 9/26/2003 7:52:39 PM
total visits Since Reboot
active visitors.

last accessed works but,
it doesn't show total visits or active visitiors.

Is the session different with aspx? I am trying to keep with aspx rather than asp.

Frank42
09-26-2003, 08:15 AM
I am trying to show the number of active sessions. The code I am using works localy but does not after its uploaded. Is there some security issue that will prevent the session information from being displayed
here is a sample of the code.
<%
dim tAccessTime
tAccessTime = session("lastAccessTime")

if tAccessTime = " " then
Response.write ("First Time <p>")
else
response.write ("Last Accessed at " & tAccessTime & "<P>")
end if
%>
[b]
<%= Session("VisitorID")%>
</B>total visits Since Reboot
[b]
[b]
<%= Application("Active")%>
</B>active visitors.
<% session ("LastAccesstime") = now %>

bruce
09-29-2003, 11:39 AM
where did you set these variables

Application("Active")

&

Session("VisitorID")

it's not set any where in your code


[b]quote:Originally posted by Frank42

this is how it looks when I go to the page

Last Accessed at 9/26/2003 7:52:39 PM
total visits Since Reboot
active visitors.

last accessed works but,
it doesn't show total visits or active visitiors.

Is the session different with aspx? I am trying to keep with aspx rather than asp.

</blockquote id="quote"></font id="quote">

Frank42
10-01-2003, 09:09 AM
Simple mistake on my part. I didn't set up the global.asa
Thanks for the help.