I cannot instantiante activex component from vb.net (Cannot create ActiveX component) but in vbs yes
-
2011年9月29日 12:28Hi everyone.
I really stuck and I don't know how to fix it.
You see, I create from server (windows Server 2003, service pack 2 ) a com+ application. I am in the domain from the active directory. I connected to the server with another accout, also from the same domain.
once that I created the com+ application proxy, I copied the MSI and cab files to my computer (Windows xp sp 3) and I installed the COM+.
I create a test.vbs, with:
Dim a
Set a = CreateObject("ComProxy.ClasePrueba")
a.funcionDePrueba("hola")
Msgbox "OK"
Here, the vbs works fine, ok.
But, when I try to do the same in vb.net in visual studio 2003, I got the well know 429 error "Cannot create ActiveX component"
I tried a thousand times with little variances int he process, with the same result. This drive me crazy.
Another guy, (also Windows xp sp 3) in his machine can instances the com+ app.
Both accounts haven't permissions to connect to the server (that's why we connect with a generic account)
I watch the dcomcnfg and both have the same configuration, same limits (allow local and remote access to Everyon) , both activate to the same ip address.
Any idea? someone else has had this error?
I tried to clean up the stack of the wrapper, but I don't know how.
I add the the "Imports System.Runtime.InteropServices" in namespace
I put the next line before call the CreateObject statement
Marshal.ReleaseComObject(ComProxy.ClasePrueba)
but is wrong, Does anybody knows how can I clean the heap of the wrapp class?
Thanks in advance!
Any suggestion will be appreciated
Muss ist sein?? ... Ist muss sein!!!!!... Aber, ist konnte auch andere sein.......
すべての返信
-
2011年9月29日 17:44Did you look in the Event log on the Server (where COM+ is running)? This error should log an event which will provide more information about the ActiveX failure.
Paul ~~~~ Microsoft MVP (Visual Basic) -
2011年10月3日 7:42モデレータ
Hi Alexandor,
Welcome to the MSDN Forum.
What's your VB.NET code? please post it here. It will be helpful to us to find the cause.
Best regards,
Mike Feng [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.


