Show active sessions

Discussion in 'ASP.NET / ASP.NET Core' started by Bruce, Sep 26, 2003.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Bruce

    Bruce DiscountASP.NET Staff

    ASP session should work just fine.

    What do you mean by it not working?

    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
    %>

    <%= Session("VisitorID")%>
    </B>total visits Since Reboot


    <%= Application("Active")%>
    </B>active visitors.
    <% session ("LastAccesstime") = now %>
    </blockquote id="quote"></font id="quote">
     
  2. 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.
     
  3. 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
    %>

    <%= Session("VisitorID")%>
    </B>total visits Since Reboot


    <%= Application("Active")%>
    </B>active visitors.
    <% session ("LastAccesstime") = now %>
     
  4. Bruce

    Bruce DiscountASP.NET Staff

    where did you set these variables

    Application("Active")

    &

    Session("VisitorID")

    it's not set any where in your code


    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">
     
  5. Simple mistake on my part. I didn't set up the global.asa
    Thanks for the help.
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page