I have one application object that keeps track of how many users are logged onto my site at any given time, however I want to develope a script to list all of the user's names or ID's that are currently logged on for everyone to see who's on the site with them at the same time. (small site...200 or less people)
I tried assigning an application object as a scripting dictionary to load the user's name to the list as they log in, and then when the session ends it'd take their name out of the list...but getting this error on a test page...
Application object error 'ASP 0197 : 80004005'
Disallowed object use
/user.asp, line 13
Cannot add object with apartment model behavior to the application intrinsic object.
Anyone have any ideas? Here is my code for the test page...once it's working I will tweak it to use within the site...
<% @ Language=VBScript %>
<% Option Explicit %>
<form action="<%= Request.ServerVariables("Script_Name"
%>">
User: <input type='text' name='user'>
<BR><BR>
<DD><input type='submit' value='Submit'>
</form>
<%
Dim user
user = Trim(Request.QueryString("user"
)
If Len(user) > 0 Then
If IsEmpty(Application("userList"
) Then
Set Application("userList"
= Server.CreateObject("Scripting.Dictionary"
End If
Dim localUsers
Set localUsers = Application("userList"
localUsers.Add CStr(localUsers.Count+1),user
End If
%>
Thanks in advance for any help you can offer! -Ovatvvon :-Q
I tried assigning an application object as a scripting dictionary to load the user's name to the list as they log in, and then when the session ends it'd take their name out of the list...but getting this error on a test page...
Application object error 'ASP 0197 : 80004005'
Disallowed object use
/user.asp, line 13
Cannot add object with apartment model behavior to the application intrinsic object.
Anyone have any ideas? Here is my code for the test page...once it's working I will tweak it to use within the site...
<% @ Language=VBScript %>
<% Option Explicit %>
<form action="<%= Request.ServerVariables("Script_Name"
User: <input type='text' name='user'>
<BR><BR>
<DD><input type='submit' value='Submit'>
</form>
<%
Dim user
user = Trim(Request.QueryString("user"
If Len(user) > 0 Then
If IsEmpty(Application("userList"
Set Application("userList"
End If
Dim localUsers
Set localUsers = Application("userList"
localUsers.Add CStr(localUsers.Count+1),user
End If
%>
Thanks in advance for any help you can offer! -Ovatvvon :-Q