---
title: "min chat -men fel?"
type: "forum-thread"
url: "https://www.webforum.nu/amne/asp/7601-min-chat-men-fel"
topic: "ASP"
topic_url: "https://www.webforum.nu/amne/asp"
author: "crisse6"
published: "2001-01-04T22:29:00.000Z"
updated: "2001-01-05T12:49:00.000Z"
replies: 5
views: 268
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/asp/7601-min-chat-men-fel"
---

# min chat -men fel?

## #1 — crisse6, 2001-01-04T22:29Z

har tänkt använda en chat... men jag får ett felmeddelande när jag försöker testa det, jag får meddelande om fel i
default.asp

```
<% Response.Buffer = true %>
<html>

<head>
<title>Cafe Entrance</title>
</head>

<body bgcolor="#FFFFFF">

<% If trim(Request.Form("name")) = "" Then %>

<h1>Welcome to the Cafe</h1>

The Cafe is a casual gathering place to meet new friends and
chat with old ones.<p>
To enter the Cafe, type the name you wish to use below and
click the button.<p>

<form action="default.asp" method="POST">
    <p>Your Name: <input type="text" size="20" name="Name"></p>
    <p><input type="submit" name="Submit"
    value="Take Me To The Cafe"></p>
</form>

<%
Else
   If Not IsObject(Application("users")) Then
      Application.Lock
      Set Application("users") = _
         Server.CreateObject("Scripting.Dictionary")
      Application.Unlock
   End If

   Session("name") = Request.Form("name")

   Application.Lock
   Application("users").Add Session("name"), time
   Application.Unlock

   If not IsEmpty(Application("conversation")) Then 
      Application.Lock
      Application("conversation") = "<b><i>" & Session("name") & _
         " Enters The Room</b></i><br>" & Application("conversation")
      Application.Unlock
   End If

   Response.Redirect "cafe.asp"
End If
%>
</body>
</html>
```

hoppas ni kan hjälpa mig :)

Permalänk: https://www.webforum.nu/p/7601

## #2 — emission, 2001-01-04T23:00Z

På vilken rad är felet?

Permalänk: https://www.webforum.nu/p/253363

## #3 — crisse6, 2001-01-04T23:32Z

det ligger på "line 29"

Permalänk: https://www.webforum.nu/p/253364

## #4 — emission, 2001-01-05T00:03Z

Set Application("users") = Server.CreateObject("Scripting.Dictionary")

Felaktig radbrytning

Permalänk: https://www.webforum.nu/p/253365

## #5 — crisse6, 2001-01-05T11:11Z

a men det funkar inte ändå... detta blir meddelandet i webbläsaren: 

Application object error 'ASP 0197 : 80004005' 

Disallowed object use 

/chat/default.asp, line 29 

Cannot add object with apartment model behavior to the application intrinsic object.

Permalänk: https://www.webforum.nu/p/253366

## #6 — emission, 2001-01-05T12:49Z

Precis. Man kan inte lägga en scripting.dctionary i application hur som helst. Du bör göra det genom global.asa med

\<OBJECT RUNAT=Server SCOPE=Application ID="users" PROGID="Scripting.Dictionary"\>
\</OBJECT\>

Det är egentligen inte rekommendabelt, pga av multitrådningsskäl som jag inte kan gå in på här, men om du gör som jag beskrev så funkar det.

Permalänk: https://www.webforum.nu/p/253367

---

Tråden på webben: https://www.webforum.nu/amne/asp/7601-min-chat-men-fel
