Application level Dictionary Object?

Results 1 to 4 of 4

Thread: Application level Dictionary Object?

  1. #1
    Dragonne Guest

    Default Application level Dictionary Object?

    Hi there. This seems so simple, yet I can&#039;t seem to get it to work.<BR><BR>I am making a simple ASP chatroom and it needs an applications level Dictionary object. No matter where I try to declare it(in the login page, if the object doesn&#039;t exist, or in the global.asa) I get the error:<BR><BR>Application object error &#039;ASP 0197 : 80004005&#039; <BR><BR>Disallowed object use <BR><BR>/chat/default.asp, line 60 <BR><BR>Cannot add object with apartment model behavior to the application intrinsic object. <BR><BR><BR>How do I either get around this error? Do I need to upgrade my IIS or something? I&#039;ve done research that says this should work. here&#039;s the simple code that produces the error:<BR><BR> If Not IsObject(Application("ChatUsers")) Then<BR> Application.Lock<BR> Set Application("ChatUsers") = Server.CreateObject("Scripting.Dictionary")<BR> Application.Unlock<BR> End If<BR><BR>With the error occuring on the "Set" line. I am using NT4.0 SP6a with IIS4.<BR><BR>Thanks in advance for any help.

  2. #2
    Mike Shaffer Guest

    Default RE: Application level Dictionary Object?

    You should not use the dictionary object at the application level because of its threading model. Instead, use the Microsoft supplied &#039;lookup table&#039;. This question was recently asked in the Advanced Moderated forum (by Kishore). Look there for more info, or point your browser to:<BR><BR> <BR><BR>

  3. #3
    Dragonne Guest

    Default Thanks

    By the docs I saw, that should do the trick.<BR><BR>Thanks a lot. :)

  4. #4
    Dragonne Guest

    Default Read-Only=bad

    Ok, problem... It&#039;s read-only.<BR><BR>In a multi-user chat room, I need to constantly update the values.<BR><BR>Any other Application level solutions with similar functionality of a Dictionary object?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts