473,752 Members | 7,898 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Exception when accessing dictionary object

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="VBScr ipt"%>
<% Option Explicit %>
<html>
<head>
<title>test</title>
<body>
<%
dim dictConfigurati on
set dictConfigurati on = server.createob ject("SCRIPTING .DICTIONARY")
dictConfigurati on("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 dictConfigurati on("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)
Jul 22 '05
26 4066
"Alan Silver" wrote in message news:SI******** ******@nospamth ankyou.spam...
:>: >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/archive2...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
Jul 22 '05 #11
Alan Silver wrote:
<snipped>
<%
dim dictConfigurati on
set dictConfigurati on = server.createob ject("SCRIPTING .DICTIONARY")
dictConfigurati on("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 dictConfigurati on("a") = "b" <snipped>

Hi Alan,

Scripting.Dicti onary object had (has?) some threading issues; Eric
Lippert of Microsoft wrote it while learning about threading:
http://blogs.msdn.com/ericlippert/ar.../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_OnS tart() 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 "dictionari es": $DicA and $DicB.

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

' To delete a key:
Session.Content s.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.Dicti onary Object remains his tar-baby!-))
Jul 22 '05 #12
>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.

--
Alan Silver
(anything added below this line is nothing to do with me)
Jul 22 '05 #13
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.
<%
dim dictConfigurati on
set dictConfigurati on = server.createob ject("SCRIPTING .DICTIONARY")
dictConfigurati on("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 dictConfigurati on("a") = "b"

<snipped>

Hi Alan,

Scripting.Dict ionary object had (has?) some threading issues; Eric
Lippert of Microsoft wrote it while learning about threading:
http://blogs.msdn.com/ericlippert/ar.../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_OnS tart() 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 "dictionari es": $DicA and $DicB.

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

' To delete a key:
Session.Conten ts.Remove("$Dic A" & "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.Dicti onary Object remains his tar-baby!-))


--
Alan Silver
(anything added below this line is nothing to do with me)
Jul 22 '05 #14
>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

--
Alan Silver
(anything added below this line is nothing to do with me)
Jul 22 '05 #15
"Alan Silver" wrote in message news:od******** ******@nospamth ankyou.spam...
: >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
Jul 22 '05 #16
>: 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

--
Alan Silver
(anything added below this line is nothing to do with me)
Jul 22 '05 #17
"Alan Silver" wrote in message news:vI******** ******@nospamth ankyou.spam...
:>: 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
Jul 22 '05 #18
<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 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

--
Alan Silver
(anything added below this line is nothing to do with me)
Jul 22 '05 #19
"Alan Silver" wrote in message news:QA******** ******@nospamth ankyou.spam...
: <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
Jul 22 '05 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
2987
by: Stefan Behnel | last post by:
Hi! I'm trying to do this in Py2.4b1: ------------------------------- import logging values = {'test':'bla'} logging.log(logging.FATAL, 'Test is %(test)s', values) -------------------------------
0
277
by: Fiona McBride | last post by:
Hi all, I have a really odd problem with some Visual Basic .NET 2003 code; I have a program that creates a number of windows which contain RichTextBox, Timers (disabled) and menus. The code runs fine and creates the windows as required, BUT if the program is left to do nothing for several hours, when it is brought back into focus it generates an exception error (Object reference not set to instance of an object - this always coincides...
0
1121
by: Martin | last post by:
Hi, I have create a Graphics object from a HWND Both the Window and the Graphics object are created by the same thread, nevertheless when i dispose the object, I get an exception indicating that the object is in use some where else. Any comments? Best regards
1
2058
by: aftab Alam | last post by:
Hi All, I have am working on C# 2.0 for a project and need to know the best practices for exception handling. At the moment I am doing it as Follows. I have a Manager class that is supposed to update entries in the Dictionary and Database as well, to separate DataBase Layer I have written another library that contains static methods and does some updating in data base..
7
2705
by: Chuck Hartman | last post by:
I have a Windows service that requests web pages from a site using an HttpWebRequest object. When I try to request a page from an ASP.NET 2 site, I get a WebException with message "The remote server returned an error: (500) Internal Server Error." I found a post that suggested to catch the WebException to retrieve the actual HttpWebResponse object for more information. The response returned is shown below. At first I thought this was a...
9
6818
by: Paulustrious | last post by:
Is it possible to override the behaviour of a dictionary if an object is not found? string ss=null; Dictionary<string, string> dict = new Dictionary<string, string>(); // method 1 try { ss = dict; }
1
2159
by: Zytan | last post by:
I have a function that accepts an Exception, and writes out all of its information to a log. This function is called in many places where an exception is caught. In some places, I'd like to add one more bit of information to the log. I could just write it out to the log there, or, I could add it to the Exception.Data dictionary. I am wondering if it is 'bad' to edit Data in a system exception? I realize that Exception.Data is mainly...
1
1889
by: Peter | last post by:
Hi, I have a Dictionary<key, valuewhich is accessed by three threads. One thread puts my value objects in the dictionary (occasionally), and also updates the contents of existing value objects - by finding the appropriate object via a key and updating the value (this updating happens several times a second). Another thread removes "dead" value objects from the dictionary (very occasionally)
0
1578
by: senpark15 | last post by:
Hi EveryBody, I am developing .net remoting application.I have Created server and client application. Server has installed on Two Pc's and cliient have to connect two Pc's and do some functions. Its working Fine on local machine . But when i tried to connect two PC's, its through an remoting exception This is my server code: Dictionary<string, object> props = new Dictionary<string, object>(); props = "Full";
0
9020
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8861
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9423
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8282
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6830
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6101
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4726
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2819
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2237
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.