When calling Marshal.GetActiveObject( class id here) what would cause error 800401E3 (Operation Unavailable)?

StackOverflow https://stackoverflow.com/questions/1065101

  •  21-08-2019
  •  | 
  •  

Question

We have a scenario where some .NET code is attempting to access the current instance of a COM (actually DCOM) object.

The object being accessed was developed in VB6. A current instance of it is available on the remote system, and appears to be accessed correctly from VB6 code.

Attempting to call Marshal.GetActiveObject, specifying the class name, causes a COMException to be thrown, referencing error 800401E3 (Operation Unavailable).

The same .NET code appears to operate correctly when run on the machine hosting that DCOM component.

Can anyone suggest why this COMException is getting generated?

Was it helpful?

Solution

Did you try to use the [STAThread] attribute in the dot net client app?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top