What is WRONG!!

Results 1 to 2 of 2

Thread: What is WRONG!!

  1. #1
    Join Date
    Dec 1969
    Posts
    102

    Default What is WRONG!!

    When running this page I get this error message:<BR><BR>Disallowed object use <BR><BR>/chatroom/opage.asp, line 20 <BR><BR>Cannot add object with apartment model behavior to the application intrinsic object. <BR><BR>This is the page:<BR><BR><BR>&#060;% <BR>Response.Buffer = true <BR>%&#062;<BR>&#060;HTML&#062;<BR>&#060;head&#062 ;<BR>&#060;/head&#062;<BR>&#060;body&#062;<BR>&#060;%<BR>If trim(Request.Form("name")) = "" Then %&#062;<BR>Welcome<BR>&#060;FORM action="opage.asp" method="post"&#062;<BR>&#060;INPUT type="text" name="name"&#062;<BR>&#060;INPUT type="submit" name="submit"&#062;<BR>&#060;/form&#062;<BR>&#060;%<BR>else<BR>If not IsObject(Application("users")) Then<BR>Application.Lock<BR>set Application("users") = Server.CreateObject("Scripting.Dictionary")<BR>App lication.UnLock<BR>End If<BR><BR>Session("name") = Request.Form("name")<BR><BR>Application.Lock<BR>Ap plication("users").add Session("name"), time<BR>Application.Unlock<BR>If not IsEmpty(Application("conversation")) Then<BR>Application.Lock<BR>Application("conversat ion") = "&#060;B&#062;&#060;I&#062;" & Session("name") & "Enters The Room&#060;/B&#062;&#060;/I&#062;"<BR>Application.UnLock<BR>End If<BR><BR>Response.redirect "cafe.asp"<BR>End If<BR><BR>%&#062;<BR>&#060;/body&#062;<BR>&#060;/html&#062;<BR><BR><BR>Can someone help me. Some of the lines of code are wraped because of the length of them.<BR>Thanks.<BR>

  2. #2
    besharah Guest

    Default RE: What is WRONG!!

    I&#039m not sure about the dictionary object but when I&#039ve created objects in VB and added them to the Application.contents collection the objects had to be single-threaded. Apartment threaded objects could not be stored in the application object. This makes sense since you probably want all your visitors to access the same copy of the Dictionary object instead of creating multiple copies for themselves. I&#039ve created a chat room myself using ASP and VB. If your interested I can send you my code. besharah@hotmail.com. <BR><BR>Hope that helps.

Posting Permissions

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