Exception when accessing dictionary object

A

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.
 
R

Roland Hall

in message : 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
 
A

Alan Silver

: 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.
How about...

dictConfiguration.Add "a", "b"

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?
 
B

Bob Barrows [MVP]

Alan said:
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?
Have you recently installed anti-virus software with a script-blocking
feature?

Bob Barrows
 
A

Alan Silver

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

Nope. We have NOD on the server, but that doesn't have script-blocking
(don't worry, it's safe!!).

Thanks for the reply. Any other suggestions welcome.
 
R

Roland Hall

: >Have you recently installed anti-virus software with a script-blocking
: >feature?
:
: Nope. We have NOD on the server, but that doesn't have script-blocking
: (don't worry, it's safe!!).

This appears to be an issue that has been around for awhile. Bob and Luke
(MSFT) have responded to another in 2004 but the poster didn't follow up
completely. I read an article where this error number is attached to
several types of issues for Win2K and an update for IIS appears to have
solved the issue. Are you up to date on IIS6 updates?

This article is the discussion to try to find the cause but unfortunately
nothing was resolved.
http://www.codecomments.com/archive288-2004-10-297811.html

Searching all of Microsoft.com is extremely frustrating. 800a01fb is not
found anywhere. How helpful is that? An error message with no support.
Perhaps Luke has a special database?!

--
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
 
A

Alan Silver

: >Have you recently installed anti-virus software with a script-blocking
: >feature?
:
: Nope. We have NOD on the server, but that doesn't have script-blocking
: (don't worry, it's safe!!).

This appears to be an issue that has been around for awhile. Bob and Luke
(MSFT) have responded to another in 2004 but the poster didn't follow up
completely.

I saw that article and got frustrated at the lack of result ;-(
I read an article where this error number is attached to
several types of issues for Win2K and an update for IIS appears to have
solved the issue. Are you up to date on IIS6 updates?

As far as I know.
This article is the discussion to try to find the cause but unfortunately
nothing was resolved.
http://www.codecomments.com/archive288-2004-10-297811.html

Searching all of Microsoft.com is extremely frustrating. 800a01fb is not
found anywhere. How helpful is that? An error message with no support.
Perhaps Luke has a special database?!

Dunno, but I was as surprised as you at the lack of help of the MS site.

As it happens, the server is going to be rebuilt tomorrow night, so I
would hope the problem will be sorted. I just get annoyed at these sorts
of problems that turn up apparently out of nowhere and don't seem to
have a good explanation.

If you find anything further, please let me know. I would still like to
find out the cause.

Ta ra
 
C

Chris Hohmann

Alan Silver said:
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.

Can you try using CreateObject instead of Server.CreateObject? Here's an
article that discusses the differences:

http://aspfaq.com/show.asp?id=2336

Also, have you check the event logs to more detailed information on the
error?
 
C

Chris Hohmann

Alan Silver said:
OK, I tried that and it didn't make any difference. Thanks for the link, I
didn't know about those differences.

I was taking a random guess there. :) I thought perhaps there was some
conflict between MTS and the dictionary object.
Yup, nothing there.

Hmm... color me stumped. Just to be clear, the code you posted for test.asp
is in its entirety correct? Also, that page consistently fails with the
error you listed. I only bring it up because the other thread that was
reference indicated an intermittent problem. If the server rebuild does not
resolve the problem tomorrow, could you post some more details about your
server environment. You indicated this was a Windows 2003 box. Have you
installed SP1? Also could you tell us what versions of IIS/ASP/VBScript you
are running.
 
R

Roland Hall

in message :>: >Have you recently installed anti-virus software with a script-blocking
: >: >feature?
: >:
: >: Nope. We have NOD on the server, but that doesn't have script-blocking
: >: (don't worry, it's safe!!).
: >
: >This appears to be an issue that has been around for awhile. Bob and
Luke
: >(MSFT) have responded to another in 2004 but the poster didn't follow up
: >completely.
:
: I saw that article and got frustrated at the lack of result ;-(
:
: > I read an article where this error number is attached to
: >several types of issues for Win2K and an update for IIS appears to have
: >solved the issue. Are you up to date on IIS6 updates?
:
: As far as I know.
:
: >This article is the discussion to try to find the cause but unfortunately
: >nothing was resolved.
: >http://www.codecomments.com/archive288-2004-10-297811.html
: >
: >Searching all of Microsoft.com is extremely frustrating. 800a01fb is not
: >found anywhere. How helpful is that? An error message with no support.
: >Perhaps Luke has a special database?!
:
: Dunno, but I was as surprised as you at the lack of help of the MS site.
:
: As it happens, the server is going to be rebuilt tomorrow night, so I
: would hope the problem will be sorted. I just get annoyed at these sorts
: of problems that turn up apparently out of nowhere and don't seem to
: have a good explanation.
:
: If you find anything further, please let me know. I would still like to
: find out the cause.

I'm betting it's probably a security update that requires something
reapplied. We used to have to reapply SPs, even when MSFT said there was no
need, like with W2K and I can't tell you how many times it solved the issue.
The other thing they would do is overwrite OEM drivers so those drivers had
to be reapplied after. And, Exchange was the worst because those updates
had to come at the end. Get them out of order, poof! Instant headache.

--
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
 
M

Michael D. Kersey

Alan Silver wrote:
<%
dim dictConfiguration
set dictConfiguration = server.createobject("SCRIPTING.DICTIONARY")
dictConfiguration("a") = "b"
%>
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"
<snipped>

Hi Alan,

Scripting.Dictionary object had (has?) some threading issues; Eric
Lippert of Microsoft wrote it while learning about threading:
http://blogs.msdn.com/ericlippert/archive/2003/09/19/53054.aspx
On his blog Eric discusses problems that can occur when using the
Dictionary object (and many other things).

Possible workarounds if you get desperate:
I. There is a component, called "Lookup Table Component", written by
some other Microsoft programmers who wanted better performance than the
Dictionary object provided. Perhaps you could use it. But it's somewhat
limited: you can only load it at Application_OnStart() IIRC:
The Lookup Table Component is an Active Server Pages component that provides an efficient read-only lookup table of string (or integer) values and string (or integer) keys. It offers better performance than the default VBScript Dictionary Object, especially
in session and application scope.

II. Use the Session or Application object as a replacement:
' To store info in a Session "dictionary":
Session("$DicA" & "a") = "b"
' To store info in another "dictionary":
Session("$DicB" & "a") = "b"

' There are now two "dictionaries": $DicA and $DicB.

' To retrieve info:
strA = Session("$DicA" & "a")
strB = Session("$DicB" & "a")

' To delete a key:
Session.Contents.Remove("$DicA" & "a")

Optionally wrapper the above in subroutines or create your own
dictionary class, each instance which then stores values into the
Session or Application object or in internal variables.

The above is simpler and faster than the Dictionary Object and gives you
most of it's functionality.

But perhaps Mr. Lippert will see these posts and render assistance. Ugly
as it is, the Scripting.Dictionary Object remains his tar-baby!-))
 
A

Alan Silver

Hmm... color me stumped. Just to be clear, the code you posted for test.asp
is in its entirety correct?

Yup, copied and pasted.
Also, that page consistently fails with the
error you listed. I only bring it up because the other thread that was
reference indicated an intermittent problem.

No, this is consistent and constant.
If the server rebuild does not
resolve the problem tomorrow, could you post some more details about your
server environment. You indicated this was a Windows 2003 box. Have you
installed SP1? Also could you tell us what versions of IIS/ASP/VBScript you
are running.

It had (well, still has until tonight!!) all the latest hot fixes and
SP1. It is using whatever version of IIS, ASP and VBScript come as
standard. We haven't changed anything there.

As I said earlier, the script had been working fine. I assume it must be
some permissions or security "fix" that scuppered it, but it's hard to
find out what.

Anyway, I'll see how it looks in the morning. Thanks for the reply.
 
A

Alan Silver

Michael,

Thanks for the reply. I should point out that the forum software in
question wasn't written by us, it's a third party one that is used all
over the place. I wouldn't want to start rewriting it, partly because of
the work involved, and partly because any updates would have to be
scrutinised to see if they need changing. The amount of work would be
too much to justify. We would be better off finding another forum
software!!

Also, the software has been working fine for a while. It's only just
stopped. That seems to indicate that there's some issue with the object,
not the software. If so, this could affect other things on the sites on
the machine, so we would be better off finding out why the object has
stopped working.

Thanks for the reply.
 
A

Alan Silver

I'm betting it's probably a security update that requires something
reapplied. We used to have to reapply SPs, even when MSFT said there
was no need, like with W2K and I can't tell you how many times it
solved the issue. The other thing they would do is overwrite OEM
drivers so those drivers had to be reapplied after. And, Exchange was
the worst because those updates had to come at the end. Get them out
of order, poof! Instant headache.

Been there, done that, got the t-shirt <g>

We are rebuilding the server tonight, and it is going to have every hot
fix, service pack, patch, sticker, go faster stripe, etc applied in the
recommended order, so we will see what happens in the morning.

I have a freshly built server here with the same OS, that I installed
fomr the CD, then applied SP1 which brought it right up to date and the
script works there, so I'm hoping that if we do that to this other
server, it will work out fine.

Thanks for the reply
 
R

Roland Hall

in message : >I'm betting it's probably a security update that requires something
: >reapplied. We used to have to reapply SPs, even when MSFT said there
: >was no need, like with W2K and I can't tell you how many times it
: >solved the issue. The other thing they would do is overwrite OEM
: >drivers so those drivers had to be reapplied after. And, Exchange was
: >the worst because those updates had to come at the end. Get them out
: >of order, poof! Instant headache.
:
: Been there, done that, got the t-shirt <g>
:
: We are rebuilding the server tonight, and it is going to have every hot
: fix, service pack, patch, sticker, go faster stripe, etc applied in the
: recommended order, so we will see what happens in the morning.
:
: I have a freshly built server here with the same OS, that I installed
: fomr the CD, then applied SP1 which brought it right up to date and the
: script works there, so I'm hoping that if we do that to this other
: server, it will work out fine.
:
: Thanks for the reply

You're welcome. Hope all goes well. Please keep us updated. It sure would
be nice to know what the cause is but I understand it's not always possible
to be able to devote time and resources when business is suffering.

Good luck.

--
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
 
A

Alan Silver

: I have a freshly built server here with the same OS, that I installed
: fomr the CD, then applied SP1 which brought it right up to date and the
: script works there, so I'm hoping that if we do that to this other
: server, it will work out fine.

You're welcome. Hope all goes well. Please keep us updated. It sure
would be nice to know what the cause is but I understand it's not
always possible to be able to devote time and resources when business
is suffering.

Unfortunately, the rebuild didn't go as planned as the SQL man couldn't
make it at the last minute, and the pre-built hard disk wouldn't boot.
Looks like we have to live with this problem a little longer.

Ho hum
 
R

Roland Hall

in message :>: I have a freshly built server here with the same OS, that I installed
: >: fomr the CD, then applied SP1 which brought it right up to date and the
: >: script works there, so I'm hoping that if we do that to this other
: >: server, it will work out fine.
: >
: >You're welcome. Hope all goes well. Please keep us updated. It sure
: >would be nice to know what the cause is but I understand it's not
: >always possible to be able to devote time and resources when business
: >is suffering.
:
: Unfortunately, the rebuild didn't go as planned as the SQL man couldn't
: make it at the last minute, and the pre-built hard disk wouldn't boot.
: Looks like we have to live with this problem a little longer.
:
: Ho hum

SQL guys can never be trusted. (O;=

--
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
 
A

Alan Silver

: Unfortunately, the rebuild didn't go as planned as the SQL man couldn't
: make it at the last minute, and the pre-built hard disk wouldn't boot.
: Looks like we have to live with this problem a little longer.
:
: Ho hum

SQL guys can never be trusted. (O;=

<g>

Oddly enough, the following day I was copying a file to the server when
it suddenly rebooted itself. No idea why, but it did. When it came back
up, the dictionary was working fine!! The machine had been rebooted the
previous night after the aborted rebuild, so it wasn't that simple.

I hate computers sometimes, they can be even more irrational and
frustrating than children!!

Anyway, we are going for another attempt this Weds, so we will see what
happens.

Ta ra
 
R

Roland Hall

in message : <snip>
: >: Unfortunately, the rebuild didn't go as planned as the SQL man couldn't
: >: make it at the last minute, and the pre-built hard disk wouldn't boot.
: >: Looks like we have to live with this problem a little longer.
: >:
: >: Ho hum
: >
: >SQL guys can never be trusted. (O;=
:
: <g>
:
: Oddly enough, the following day I was copying a file to the server when
: it suddenly rebooted itself. No idea why, but it did. When it came back
: up, the dictionary was working fine!! The machine had been rebooted the
: previous night after the aborted rebuild, so it wasn't that simple.

I was always fascinated by AI (Artificial Intelligence) but on-the-fly AI
might make scheduling downtime more difficult.
:
: I hate computers sometimes, they can be even more irrational and
: frustrating than children!!

Ooh, that's a close one. The age of both might make a difference.

: Anyway, we are going for another attempt this Weds, so we will see what
: happens.

Good luck.

--
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top