I cannot instantiante activex component from vb.net (Cannot create ActiveX component) but in vbs yes


  • Hi 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")
    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


    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.......
    29 Eylül 2011 Perşembe 12:28

Tüm Yanıtlar

  • Did 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)
    29 Eylül 2011 Perşembe 17:44
  • 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.

    03 Ekim 2011 Pazartesi 07:42