C# late binding on remote DCOM error: "Class not registered"

Discussion in 'ASP .Net' started by =?Utf-8?B?UGF1bCBX?=, Sep 20, 2006.

  1. I attempted to find the solution and came close
    (http://blogs.msdn.com/robgruen/archive/2005/01/24/359660.aspx) but cannot go
    any further. I have an ASP.NET (2003/C#) app that calls a VB 6 DCOM on a
    remote server. Identity used on DCOM is the same identity as used for the IIS
    app.

    Line of code that throws error:
    object obj =
    Activator.CreateInstance(Type.GetTypeFromProgID("class","server1"));

    Error thrown:
    System.Runtime.InteropServices.COMException: Class not registered

    However, if I step through my code and change the aforementioned line to:
    object obj =
    Activator.CreateInstance(Type.GetTypeFromProgID("InternetExplorer.Application.1","server1")); it will step through without error.

    I can login to the server and see the class in registry. Remote VB6 clients
    (exe's) that use this component are able to use it successfully, so I'm
    positive that the component is setup properly and being used successfully via
    the VB6 exe's. All I'm trying to do is call a single function in the class
    and get its return value.
     
    =?Utf-8?B?UGF1bCBX?=, Sep 20, 2006
    #1
    1. Advertising

  2. I can't find any references to that old posting I had made, seems like it
    fell of the face of the Earth. You can get to it here:
    http://groups.google.com/group/micr...romprogid hagus&rnum=1&hl=en#f4fcb9330b02501b
    --
    My postings are provided "AS IS" with no warranties, and confer no rights.


    "Paul W" wrote:

    > I attempted to find the solution and came close
    > (http://blogs.msdn.com/robgruen/archive/2005/01/24/359660.aspx) but cannot go
    > any further. I have an ASP.NET (2003/C#) app that calls a VB 6 DCOM on a
    > remote server. Identity used on DCOM is the same identity as used for the IIS
    > app.
    >
    > Line of code that throws error:
    > object obj =
    > Activator.CreateInstance(Type.GetTypeFromProgID("class","server1"));
    >
    > Error thrown:
    > System.Runtime.InteropServices.COMException: Class not registered
    >
    > However, if I step through my code and change the aforementioned line to:
    > object obj =
    > Activator.CreateInstance(Type.GetTypeFromProgID("InternetExplorer.Application.1","server1")); it will step through without error.
    >
    > I can login to the server and see the class in registry. Remote VB6 clients
    > (exe's) that use this component are able to use it successfully, so I'm
    > positive that the component is setup properly and being used successfully via
    > the VB6 exe's. All I'm trying to do is call a single function in the class
    > and get its return value.
     
    =?Utf-8?B?cm9iZ3J1ZW4=?=, Sep 21, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alex
    Replies:
    3
    Views:
    1,518
    Alvin Bruney
    Dec 2, 2003
  2. VB Programmer

    Problem: Late binding error with arraylist

    VB Programmer, Jun 17, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    437
    John Saunders
    Jun 18, 2004
  3. Replies:
    1
    Views:
    3,503
    CyberOwl
    Sep 7, 2009
  4. Adotek
    Replies:
    1
    Views:
    453
    Bruno Alexandre
    Oct 3, 2006
  5. Replies:
    2
    Views:
    908
    Kevin Grover
    Oct 20, 2006
Loading...

Share This Page