Maurizio Butti - 2004-01-21

Logged In: YES
user_id=565214

Had the same problem. Seems like a Remoting.Corba Library.
The docs state that you should provide a constructor with
the same parameter types as the fields in your exception
class. Forget about it since no constructor gets called. The
Remoting.Corba library gets an instance via a
FormatterServices.GetUninitializedObject call, which calls no
constructor.

I resolved the problem by overriding the Deserialize method:

public new void Deserialize(GiopDeserializationContext
context) {
base.Deserialize(context);
exceptionType=(ExceptionType_T)
context.ReadObject(typeof(ExceptionType_T));
errorReason=(string)context.ReadObject(typeof
(string));
}

where exceptionType and errorReason are the two fields of
the CorbaUserException derived class, respectively of types
ExceptionType_T (an enum), and string. Please note that I
also had to derive from the ICdrSerializable interface to get
the exception working.

Please let me know if this approach managed to solve the
problem.

I'd also like to hear from Kristopher if my explanation makes
sense. Thanks Kristopher!