访问字典对象时出现异常 [英] Exception when accessing dictionary object

查看:95
本文介绍了访问字典对象时出现异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


我有一台运行Windows Server 2003的服务器,其中两个网站
使用MegaBBS ASP论坛软件。两个站点突然发生了相同的错误,这似乎与字典对象有关。


经过一些修修补补后,我将其削减到以下(完整)

ASP ...


<%@ CodePage = 65001语言=" VBScript"%>

<%Option明确%>

< html>

< head>

< title> test< / title>

< body>

<%

dim dictConfiguration

set dictConfiguration = server.createobject(" SCRIPTING .DICTIONARY")

dictConfiguration(" a")=" b"

%>

< / body>

< / html>

运行时,这会出错...


Microsoft VBScript运行时错误''800a01fb''


发生异常


/forum/test.asp,第10行

其中第10行是第1行尝试设置dictConfiguration(a)= b


前一行没有给出错误,所以我假设对象

创建好了。我甚至添加了一些代码来列出

字典的内容,并且没有给出错误,因此对象*就是*。我好像b $ b似乎无法使用它!


任何想法吗?我搜索了谷歌,但没有找到任何相关的b $ b。我最近不知道这台机器有什么变化,但是随着MS的自动更新,你不能再说了。


-

Alan Silver

(此行下面添加的任何内容都与我无关)

Hello,

I have a server running Windows Server 2003, on which two of the web
sites use the MegaBBS ASP forum software. Both sites suddenly developed
the same error, which seems to be connected to the dictionary object.

After some tinkering, I whittled it down to the following (complete)
ASP...

<%@ CodePage=65001 Language="VBScript"%>
<% Option Explicit %>
<html>
<head>
<title>test</title>
<body>
<%
dim dictConfiguration
set dictConfiguration = server.createobject("SCRIPTING.DICTIONARY")
dictConfiguration("a") = "b"
%>
</body>
</html>
When run, this gives the error ...

Microsoft VBScript runtime error ''800a01fb''

An exception occurred

/forum/test.asp, line 10
where line 10 is the one that tries to set dictConfiguration("a") = "b"

The previous line doesn''t give an error, so I''m assuming that the object
is created OK. I even added some code to list the contents of the
dictionary, and that didn''t give an error, so the object *is* there. I
just don''t seem to be able to use it!!

Anyone any ideas on this? I searched Google, but didn''t find anything
relevant. I don''t know of any changes to the machine recently, but with
MS''s automatic updates, you can''t tell anymore.

--
Alan Silver
(anything added below this line is nothing to do with me)

推荐答案

" Alan Silver"在消息新闻中写道:ay ************** @ nospamthankyou.spam ...
:我有一台运行Windows Server 2003的服务器,其上有两台web

:网站使用MegaBBS ASP论坛软件。这两个网站突然发展了

:同样的错误,似乎与字典对象有关。



:经过一些修补,我削减到以下(完整)

:ASP ...



:<%@ CodePage = 65001语言=" ; VBScript"%>

:<%Option明确%>

:< html>

:< head>

:< title> test< / title>

:< body>

:<%

:dim dictConfiguration

:set dictConfiguration = server.createobject(" SCRIPTING.DICTIONARY")

:dictConfiguration(" a")=" b"

:%>

:< / body>

:< / html>


如何关于...


dictConfiguration.Add" a"," b"


-

Roland Hall

/ *这些信息的分发是希望它有用,但是

w没有任何保证;甚至没有适销性的暗示保证

或特定用途的适用性。 * /

Technet脚本中心 - http:// www .microsoft.com / technet / scriptcenter /

WSH 5.6文档 - http://msdn.microsoft.com/downloads/list/webdev.asp

MSDN Library - http://msdn.microsoft.com/library/default.asp
"Alan Silver" wrote in message news:ay**************@nospamthankyou.spam...
: I have a server running Windows Server 2003, on which two of the web
: sites use the MegaBBS ASP forum software. Both sites suddenly developed
: the same error, which seems to be connected to the dictionary object.
:
: After some tinkering, I whittled it down to the following (complete)
: ASP...
:
: <%@ CodePage=65001 Language="VBScript"%>
: <% Option Explicit %>
: <html>
: <head>
: <title>test</title>
: <body>
: <%
: dim dictConfiguration
: set dictConfiguration = server.createobject("SCRIPTING.DICTIONARY")
: dictConfiguration("a") = "b"
: %>
: </body>
: </html>

How about...

dictConfiguration.Add "a", "b"

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp


>:我有一台运行Windows Server 2003的服务器,其中两个web
>: I have a server running Windows Server 2003, on which two of the web
:sites使用MegaBBS ASP论坛软件。这两个网站突然发展了
:同样的错误,似乎与字典对象有关。
< snip>怎么样......

dictConfiguration.Add" a"," b"
: sites use the MegaBBS ASP forum software. Both sites suddenly developed
: the same error, which seems to be connected to the dictionary object. <snip>How about...

dictConfiguration.Add "a", "b"




错误更改为...发生异常:''添加''" !!


正如我所说的,这个软件运行良好已经有一段时间了,并且只是刚刚开发出这个错误。在

软件中没有任何改变,唯一的改变可能与系统本身有关。


我还有另外两台Windows Server 2003机器工作正常。

这台机器上发生了一些事情。


感谢您的回复。还有其他什么想法吗?


-

Alan Silver

(此行下面添加的任何东西都与我无关)



The error changes to ... "An exception occurred: ''Add''" !!

As I said, this software has been running fine for some time and has
only just developed this error. Nothing has been changed in the
software, the only change could be to do with the system itself.

I have two other Windows Server 2003 machine where this works fine.
Something has happened on this one machine.

Thanks for the reply. Any other ideas?

--
Alan Silver
(anything added below this line is nothing to do with me)


Alan Silver写道:
Alan Silver wrote:
我有一台运行Windows Server 2003的服务器,其中两个网站
网站使用MegaBBS ASP论坛软件。这两个网站突然发生了同样的错误,这似乎与
字典对象有关。
I have a server running Windows Server 2003, on which two of the web
sites use the MegaBBS ASP forum software. Both sites suddenly
developed the same error, which seems to be connected to the
dictionary object.


< snip>


<snip>

怎么样...

dictConfiguration.Add" a"," b"
How about...

dictConfiguration.Add "a", "b"



错误更改为...发生了异常: '' 添加 '' " !!

正如我所说,这个软件已经运行了一段时间,并且只是刚刚发生了这个错误。在
软件中没有任何改变,唯一的改变可能与系统本身有关。

我有两台其他Windows Server 2003机器可以正常工作。
东西发生在这台机器上。

感谢您的回复。还有其他想法吗?



The error changes to ... "An exception occurred: ''Add''" !!

As I said, this software has been running fine for some time and has
only just developed this error. Nothing has been changed in the
software, the only change could be to do with the system itself.

I have two other Windows Server 2003 machine where this works fine.
Something has happened on this one machine.

Thanks for the reply. Any other ideas?



您最近是否安装了带有脚本阻止功能的防病毒软件

功能?


Bob Barrows

-

Microsoft MVP - ASP / ASP.NET

请回复新闻组。我的From

标题中列出的电子邮件帐户是我的垃圾邮件陷阱,因此我不经常检查它。通过发布到新闻组,您将获得更快的回复。


Have you recently installed anti-virus software with a script-blocking
feature?

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don''t check it very often. You will get a
quicker response by posting to the newsgroup.


这篇关于访问字典对象时出现异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆