Access Com+ Component on Remote Server
- From: Emma Kate via .NET 247 <anonymous@xxxxxxxxxxxxx>
- Date: Tue, 24 May 2005 10:01:27 -0700
Well, I tried this once and it didn't appear to post. Sorry if this is a duplicate......
>From my vb.net application on XP I am trying to access some com+ components written in vb6 on a Windows 2000 server.
I tried both of the following methods with no luck.
METHOD 1:
Dim pcLogin As Object
Dim vSessionID As VariantType
Dim vErrorMsg As VariantType
Try
pcLogin = VB.CreateObject("pcLogin.clsLogin", "servername")
Catch ex As System.Exception
MsgBox(ex.ToString)
End Try
METHOD 2:
Dim pcLogin As Object
Dim vSessionID As VariantType
Dim vErrorMsg As VariantType
Dim type_pcLogin As Type
Try
type_pcLogin = Type.GetTypeFromProgID("pcLogin.clsLogin","servername")
pcLogin = Activator.CreateInstance(type_pcLogin)
Catch ex As System.Exception
MsgBox(ex.ToString)
End Try
With METHOD 1 I get 429 - Cannot Create ActiveX component. With METHOD 2 I get Class not registered on server.
I've checked in the registry and everything seems to be setup correctly, but then again I don't know what CreateObject is looking for specifically. The clsid exists, and the InProcServer32 variable points to the correct location for my dll. I am also specifying the correct progid.
The only troubleshooting information that I can find regarding is that the remote server must be running Windows 2000 if you are using the CreateObject method above. That is the case in this scenario.
Any thoughts?
Thanks very much.
--------------------------------
From: Emma Kate
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>olpezS/pU0ex9/K7vngwdw==</Id>
.
- Prev by Date: Reading in and combining text files...
- Next by Date: Re: VB-101: Passing Arrays ByVal vs ByRef
- Previous by thread: Reading in and combining text files...
- Next by thread: resolve multiple ip's
- Index(es):