Click here to Skip to main content
15,896,344 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need some help on this and it urgent. I will appriciate the quick response. I have this code in my classic asp page
dim objTestCOMLib
dim str1

dim objInputDOM 
Set objInputDOM = server.CreateObject("MSXML2.DOMDocument")
objInputDOM.async = false

objInputDOM.LoadXML(sx)

set objTestCOMLib = Server.CreateObject("ABCOMTest.COMClass1")
str1 = objTestCOMLib.ParseXMLDOM(objInputDOM)
Response.Write(str1)   
 
'and here is my dot net class library code  
Public Function ParseXMLDOM(ByVal objXML As MSXML2.DOMDocument) As String
Return objXML.xml
End Function 


when I run the application I get this eror
Error Type:
Microsoft VBScript runtime (0x800A0005)
Invalid procedure call or argument: 'ParseXMLDOM'
/TestWeb/Emp.asp, line 35

Thanks very much in advance.
Posted
Updated 6-May-10 7:07am
v4

Are you sure that the method is exposed via COM ? Did it occur to you that if you're calling a VB class via COM, it would be easier to pass in your XML string and work with a .NET DOM class to parse it ?
 
Share this answer
 
Thanks for reply Christian. I have not tried yet, what you are suggesting. I will sure try this.


Just want to mention how am I doing everything
I have strong named my dot net dll , added to GAC and also registerd through RegAsm. I have one doubt here I am using Interop.MSXML2.dll version 4.0.0.0 and when I create an object in Classic asp page through Server.CreateObject("MSXML2.DOMDocument") then I think it creates object of the version which is in "C:\WINXP\System32". This is MSXML2 version 2.6.0.0. Can that be a problem.


there are two things that want to mention

First, I tried creating my dot net windows application and added the reference of the Interop.MSXML2.dll which is being referred by my dot net dll it works fine.

Second, I tried to create and Interop of the MSXML2 version 2.6 and strong named it and also added to GAC. Now I referenced this version in my dot net dll. I again put my dot net dll into GAC and then register through REgASM.

This time the error is


Error Type:
(0x80070002)
/TestWeb/Emp.asp, line 35
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900