PBM: MSXML4 typelib constants not recognized in server-side script

V

Vince C.

Hi,

I've created a web application with Visual Interdev and I've added Microsoft
XML, version 4 in project's references. A META tag has been successfully added
in global.asa:

<!--METADATA TYPE="TypeLib" NAME="Microsoft XML, v4.0"
UUID="{F5078F18-C551-11D3-89B9-0000F81FE221}" VERSION="4.0"-->

But when I write the following code in an ASP server-side JavaScript:

<p>Value: <% = SOMITEM_ELEMENT %></p>

I get a Microsoft VBScript error '800a01f4'. Undefined variable:
'SOMITEM_ELEMENT'

I don't get such an error with ADO constants (even though I didn't include
ADOJS.inc). Can someone tell me what's wrong?

Thanks in advance,
Vince C.
 
B

Bob Barrows

Vince said:
Hi,

I've created a web application with Visual Interdev and I've added
Microsoft XML, version 4 in project's references. A META tag has been
successfully added in global.asa:

<!--METADATA TYPE="TypeLib" NAME="Microsoft XML, v4.0"
UUID="{F5078F18-C551-11D3-89B9-0000F81FE221}" VERSION="4.0"-->

But when I write the following code in an ASP server-side JavaScript:

<p>Value: <% = SOMITEM_ELEMENT %></p>

I get a Microsoft VBScript error '800a01f4'. Undefined variable:
'SOMITEM_ELEMENT'

I don't get such an error with ADO constants (even though I didn't
include ADOJS.inc). Can someone tell me what's wrong?

Thanks in advance,
Vince C.

Two possibilities:
1. The server does not have the version 4 parser installed. The Interdev
References dialog lists type libraries installed on YOUR machine. These may
not correspond with type libraries installed on the server.

2. That's not the right UUID for version 4 (unlikely, given that you added
it via Interdev References)

Bob Barrows
 
V

Vince C.

Bob Barrows said:
Vince said:
Hi,

I've created a web application with Visual Interdev and I've added
Microsoft XML, version 4 in project's references. A META tag has been
successfully added in global.asa:

<!--METADATA TYPE="TypeLib" NAME="Microsoft XML, v4.0"
UUID="{F5078F18-C551-11D3-89B9-0000F81FE221}" VERSION="4.0"-->
[...]
Two possibilities:
1. The server does not have the version 4 parser installed. The Interdev
References dialog lists type libraries installed on YOUR machine. These may
not correspond with type libraries installed on the server.

Both the server and the client workstation are the same machine.

2. That's not the right UUID for version 4 (unlikely, given that you added
it via Interdev References)

I've checked against the registry with OLE View. It's the right LIBID.

Could it be a bug in IIS such as it doesn't recognize a typelib that is shared
between multiple versions of the same package? ADO libraries have all a unique
LIBID, starting at v2.1. In the case of MSXML, LIBID
F5078F18-C551-11D3-89B9-0000F81FE221 applies to MSXML 2.6, 3.0 and 4.0. This is
the only difference I've seen.

Vince C.
 
B

Bob Barrows

Vince said:
Bob Barrows said:
Vince said:
Hi,

I've created a web application with Visual Interdev and I've added
Microsoft XML, version 4 in project's references. A META tag has
been successfully added in global.asa:

<!--METADATA TYPE="TypeLib" NAME="Microsoft XML, v4.0"
UUID="{F5078F18-C551-11D3-89B9-0000F81FE221}" VERSION="4.0"-->
[...]
Two possibilities:
1. The server does not have the version 4 parser installed. The
Interdev References dialog lists type libraries installed on YOUR
machine. These may not correspond with type libraries installed on
the server.

Both the server and the client workstation are the same machine.

2. That's not the right UUID for version 4 (unlikely, given that you
added it via Interdev References)

I've checked against the registry with OLE View. It's the right LIBID.

Could it be a bug in IIS such as it doesn't recognize a typelib that
is shared between multiple versions of the same package? ADO
libraries have all a unique LIBID, starting at v2.1. In the case of
MSXML, LIBID F5078F18-C551-11D3-89B9-0000F81FE221 applies to MSXML
2.6, 3.0 and 4.0. This is the only difference I've seen.

Vince C.

You've got me. Hopefully someone else will jump in with the answer. Have you
tried a google search?

Bob Barrows
 
M

MSFT

Hi Vince,

From the description, the ASP application didn't recognize the constance
"SOMITEM_ELEMENT" defined in MSXML. If you type:

MSXML2.

in the InterDev IDE, will the IntelliSense occur to list all objects and
constants in MSXML?

If you also have Visual Basic 6.0 installed on the same computer, you may
try to add the reference in a VB project to see if it also fail to
recognize it.

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
V

Vince C.

MSFT said:
Hi Vince,

From the description, the ASP application didn't recognize the constance
"SOMITEM_ELEMENT" defined in MSXML. If you type:

MSXML2.

in the InterDev IDE, will the IntelliSense occur to list all objects and
constants in MSXML?

Thanks, Luke. But I don't need to prefix MSXML2 constants in ASP scripts with
"MSXML2.". As soon as I type SOMITEM, for instance, VI correctly drops down a
list with possible matches. It's only when running server-side code that I get
an error.

If you also have Visual Basic 6.0 installed on the same computer, you may
try to add the reference in a VB project to see if it also fail to
recognize it.

No problem with VB at all but it's out of my scope though it works as expected
(intellisense drop down list).

Vince C.
 
C

Chris Hohmann

Vince C. said:
Hi,

I've created a web application with Visual Interdev and I've added Microsoft
XML, version 4 in project's references. A META tag has been successfully added
in global.asa:

<!--METADATA TYPE="TypeLib" NAME="Microsoft XML, v4.0"
UUID="{F5078F18-C551-11D3-89B9-0000F81FE221}" VERSION="4.0"-->

But when I write the following code in an ASP server-side JavaScript:

<p>Value: <% = SOMITEM_ELEMENT %></p>

I get a Microsoft VBScript error '800a01f4'. Undefined variable:
'SOMITEM_ELEMENT'

I don't get such an error with ADO constants (even though I didn't include
ADOJS.inc). Can someone tell me what's wrong?

Thanks in advance,
Vince C.

Remove version.

<!--
METADATA TYPE="TypeLib"
NAME="Microsoft XML, v4.0"
UUID="{F5078F18-C551-11D3-89B9-0000F81FE221}"
-->

HTH
-Chris Hohmann
 
M

MSFT

Hi Chris,

Thank you for the information, This seems to able to fix the problem.

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
M

MSFT

Hi Vince,

Please test the Chris's suggestion in your project. I think it should be
helpful since we have made sure MSXML installed well on your server and IIS
add the reference successfully.

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
V

Vince C.

Chris Hohmann said:
Remove version.

<!--
METADATA TYPE="TypeLib"
NAME="Microsoft XML, v4.0"
UUID="{F5078F18-C551-11D3-89B9-0000F81FE221}"
-->

HTH

Thanks, Chris. But this has the side-effect to prevent IntelliSense to work. I
can cope with it however as (desire is not irrelevant) I'm *not* a machine ;-).

Vince C.
 
C

Chris Hohmann

Vince C. said:
Thanks, Chris. But this has the side-effect to prevent IntelliSense to work. I
can cope with it however as (desire is not irrelevant) I'm *not* a machine ;-).

Vince C.

Note, the following is merely conjecture on my part but...

It sounds like you have a side-by-side install of MSXML 4.0 with prior
versions of MSXML (2.6/3.0) If this is the case, here are two (2) things
you can try:

1. Uninstall all MSXML components and then reinstall them in reverse
order (4.0 then 3.0 then 2.6)

2. Forego the side-by-side install and only install MSXML 4.0

I don't know what the context of your particular situation is so I can't
really say which approach best suits your needs. And as stated above
this is purely conjecture on my part. The above may or may not have any
bearing on the behavior you are encountering. Let me know if there is
anything else I can do to help.

-Chris Hohmann
 
V

Vince C.

"Chris Hohmann" <[email protected]> a écrit dans le message de
[...]
Note, the following is merely conjecture on my part but...

It sounds like you have a side-by-side install of MSXML 4.0 with prior
versions of MSXML (2.6/3.0) If this is the case, here are two (2) things
you can try:

1. Uninstall all MSXML components and then reinstall them in reverse
order (4.0 then 3.0 then 2.6)

2. Forego the side-by-side install and only install MSXML 4.0

I don't know what the context of your particular situation is so I can't
really say which approach best suits your needs. And as stated above
this is purely conjecture on my part. The above may or may not have any
bearing on the behavior you are encountering. Let me know if there is
anything else I can do to help.

-Chris Hohmann

Well, it's just MSXML4 being installed on a W2K machine. I never though of
removing previous versions since they are built-in. If I remember correctly,
there is a way (MS KB article) to remove MSXML references and re-register them
in any order. But I don't think I'll need that.

It's probably nice to have it on a development machine but not on a production
server. The one thing I was searching was to have the server recognize MSXML
constants. You gave it to me.

Thanks again for your help,
Vince C.
 

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,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top