Morten wonders about Enterprise Services and Exceptions. This is a topic that interests me greatly, and one I've had mixed success with.

For all I can see, having an object somewhere on your method signature (either as an argument or return type) ensures the custom exception is marshaled back to the client. It seems this needs to be of type object, too, because replacing it by some other reference type (like string), doesn't work, and you get back ApplicationException again.

But, alas, I'm not sure if this is just a side-effect, or this is indeed the real reason, which I highly doubt. Same appears to happen with the .NET framework v1.1, btw, at least insofar as I can see. Clues, anyone?

Tomas Restrepo

Software developer located in Colombia.