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

Discussion in 'ASP General' started by Vince C., Jan 11, 2004.

  1. Vince C.

    Vince C. Guest

    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.
     
    Vince C., Jan 11, 2004
    #1
    1. Advertising

  2. Vince C.

    Bob Barrows Guest

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

    Vince C. wrote:
    > 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

    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
     
    Bob Barrows, Jan 11, 2004
    #2
    1. Advertising

  3. Vince C.

    Vince C. Guest

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

    "Bob Barrows" <> a écrit dans le message de
    news:...
    > Vince C. wrote:
    > > 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.
     
    Vince C., Jan 11, 2004
    #3
  4. Vince C.

    Bob Barrows Guest

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

    Vince C. wrote:
    > "Bob Barrows" <> a écrit dans le message de
    > news:...
    >> Vince C. wrote:
    >>> 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

    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
     
    Bob Barrows, Jan 11, 2004
    #4
  5. Vince C.

    MSFT Guest

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

    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.)
     
    MSFT, Jan 12, 2004
    #5
  6. Vince C.

    Vince C. Guest

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

    "MSFT" <> a écrit dans le message de
    news:...
    > 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.
     
    Vince C., Jan 12, 2004
    #6
  7. Vince C.

    Vince C. Guest

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

    "Bob Barrows" <> a écrit dans le message de
    news:%...
    [...]
    > You've got me. Hopefully someone else will jump in with the answer. Have you
    > tried a google search?


    Nothing significant...

    Vince C.
     
    Vince C., Jan 12, 2004
    #7
  8. Re: MSXML4 typelib constants not recognized in server-side script

    "Vince C." <> wrote in message
    news:...
    > 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
     
    Chris Hohmann, Jan 13, 2004
    #8
  9. Vince C.

    MSFT Guest

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

    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.)
     
    MSFT, Jan 13, 2004
    #9
  10. Vince C.

    MSFT Guest

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

    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.)
     
    MSFT, Jan 13, 2004
    #10
  11. Vince C.

    Vince C. Guest

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

    "Chris Hohmann" <> a écrit dans le message de
    news:...
    > "Vince C." <> wrote in message

    ....
    > 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.
     
    Vince C., Jan 14, 2004
    #11
  12. Re: MSXML4 typelib constants not recognized in server-side script

    "Vince C." <> wrote in message
    news:...
    > "Chris Hohmann" <> a écrit dans le message de
    > news:...
    > > "Vince C." <> wrote in message

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


    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
     
    Chris Hohmann, Jan 14, 2004
    #12
  13. Vince C.

    Vince C. Guest

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

    "Chris Hohmann" <> a écrit dans le message de
    news:eragj$...
    [...]
    > 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.
     
    Vince C., Jan 15, 2004
    #13
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Magnus Blomberg
    Replies:
    3
    Views:
    727
    Magnus Blomberg
    Apr 14, 2005
  2. tgtt
    Replies:
    2
    Views:
    444
    C. M. Sperberg-McQueen
    Jan 28, 2004
  3. Rolf Kemper
    Replies:
    4
    Views:
    1,271
    David Carlisle
    Apr 13, 2005
  4. milesd
    Replies:
    0
    Views:
    615
    milesd
    Jun 14, 2005
  5. Replies:
    0
    Views:
    291
Loading...

Share This Page