NET Interop for MSXML6 on IIS 6 - Error: COM not valid or registered

brazilnut52

New member
Joined
Apr 6, 2006
Messages
2
Programming Experience
5-10
I am having some difficulty deploying a web service I have created in VB .NET. The application works fine on my development PC and on Server1 (with IIS 5.0). However, the application gives an error when invoked on Server2 (IIS 6.0). After some investigation I have discovered that the error is related to the MSXML libraries.

I have only one web method called ‘Hello World’ in the web service. The ‘Hello World’ service simply returns an XML string.

Server1 correctly returns: <?xml version="1.0" encoding="utf-8" ?> <string xmlns="testObjects">Hello World</string>

Server2 returns this error: COM object with CLSID {88D969C0-F192-11D4-A65F-0040963251E5} is either not valid or not registered.

This is the entire code in the web service:


Imports System.Web.Services
<System.Web.Services.WebService(Namespace:="testObjects")> _
Public Class Service1
Inherits System.Web.Services.WebService
Public Sub New()
MyBase.New()
InitializeComponent()
End Sub
Private components As System.ComponentModel.IContainer
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
components = New System.ComponentModel.Container
End Sub
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
<WebMethod()> _
Public Function HelloWorld() As String
Dim x As New Interop.CF.clsPort
Dim y As New Interop.INC.MathActiveX
Dim z As New Interop.MSXML6.DOMDocument40
Return "Hello World"
End Function
End Class

Notice all I am doing in the WebMethod HelloWorld() is creating a series of objects. The first two are COM Interop libraries (a .NET Wrapper for COM objects) based off of two objects that on of my developers created in classic VB CF.dll and INC.dll. Both of these COM DLLs are registered on both Server1 and Server2. I know this because these two lines of code execute no problem, so all is good with the underlying DLLs that these wrappers are calling. However, when I go to create ‘z’ I get the error I pasted above. Interop.MSXML6 is a wrapper created from MSXML6.DLL, the most recent version of MSXML from Microsoft. I installed this version on both servers yesterday. Also, all of these Interop assemblies are strong name assemblies, meaning when I used the TLBIMP utility to create them I specified a ‘Strong Name Key File’.

I have tried using Interops based on MSXML3, MSXML4, MSXML5, and MSXML6. All three work fine on Server1 and none have worked on Server2. Also, I have been getting the exact same error since the beginning. Here’s the real kicker. As I moved down version after version, still the same result Server1, good, Server2, bad. HOWEVER, when I created an Interop from MSXML2.DLL the app ran correctly on Server2. GREAT! I thought, BUT when I tested it on Server1, same error I had been getting gone Server2. So this is where I am.

Remember this app works great on my development server and Server1. So it seems to me that the question is ‘What’s the difference?’. I would say just about everything since one box has IIS 5 and the other IIS 6. I hope this information points you in the right direction. I have been working on this problem for over 2 weeks now. Any assistance would be greatly appreciated.

Thank you.
 
Back
Top