locked
COMException Error:8000401a RRS feed

  • Question

  • I have built an OPC client, which is started from a service, that will connect to an OPC server using COM interop.

    When the com-object is about to be created, by Activator.CreateInstance(Type), I get the following COMException when I'm connected to Windows Server 2003 via remote desktop.

     

    Exception Type: System.Runtime.InteropServices.COMException
      ErrorCode: -2147467238
      Message: Retrieving the COM class factory for component with CLSID {B6EACB30-42D5-11D0-9517-0020AFAA4B3C} failed due to the following error: 8000401a.

    If I log on to the server with "mstsc /console" everything works fine.

     

    Everything also works fine if I start the OPC client directly and not from the service.

     

    Do anyone have any ideas?

    Monday, June 18, 2007 1:51 PM

Answers

  • You're ahead, that's a documented error code in WinError.h: CO_E_RUNAS_LOGON_FAILURE: The server process could not be started because the configured identity is incorrect.  Check the username and password.

    Hmya, now what.  It obviously has very little to do with the CLR, the topic of this forum.  OPC uses marshaling pretty heavy, security tokens are not automatically marshaled from one thread to another.  It is definitely a security thingy.
    Monday, June 18, 2007 9:36 PM
  • Thank you!

     

    The solution was to make the OPC-server service logon as the same user as the OPC-client service.

    Sorry for posting this in the wrong forum.

    Tuesday, June 19, 2007 7:34 AM

All replies

  • You're ahead, that's a documented error code in WinError.h: CO_E_RUNAS_LOGON_FAILURE: The server process could not be started because the configured identity is incorrect.  Check the username and password.

    Hmya, now what.  It obviously has very little to do with the CLR, the topic of this forum.  OPC uses marshaling pretty heavy, security tokens are not automatically marshaled from one thread to another.  It is definitely a security thingy.
    Monday, June 18, 2007 9:36 PM
  • Thank you!

     

    The solution was to make the OPC-server service logon as the same user as the OPC-client service.

    Sorry for posting this in the wrong forum.

    Tuesday, June 19, 2007 7:34 AM