Robert Hurlbut Blog

Thoughts on Software Security, Software Architecture, Software Development, and Agility

Custom Exceptions in EnterpriseServices

Thursday, February 5, 2004 Comments

 .NET   .NET Remoting   ArchitecturePatterns   COM Interop   COMPlus EnterpriseServices 
Share:   Share on LinkedIn    Share on Twitter    Share on Google+    Share on Facebook   

Sam Gentile details some of the problems our team has run into over the past few months (not just our team, but others as well) regarding the use of custom exceptions in Enterprise Services / COMPlus.  The problem is that custom exceptions were not easily travelling across the ES/COMPlus wire.  In particular, custom exceptions were reverting back to their base exception when thrown from an ES/COMPlus Server Application.  We figured out the “why“ (as Sam mentions in his post), but we had no good solution to get around it. 

Sam mentions a March, 2004 MSDN Magazine article by Bob DeRemer titled Throwing Custom Exception Types from a Managed COMPlus Server Application that shows a couple of nice solutions to this problem.  The article is not yet available online, but the code is available for download here:  MSDNMag0403 code.

Share:   Share on LinkedIn    Share on Twitter    Share on Google+    Share on Facebook