Tuesday, February 24, 2004 10:34 AM
RHurlbut
Custom Exceptions and EnterpriseServices, Part 2
I noticed yesterday the article on Throwing Custom Exception Types from a Managed COM+ Server Application that I blogged about previously is finally available publicly.
This past week, we started implementing the first solution mentioned in the article, and things are working quite well again. It's nice to be able to throw a custom exception from an ES/COM+ Server Application and see it handled by the client! The problem we were having was that once you go over the ES/Server App boundary, the custom exception information would get lost and the base exception would get thrown instead. It has to do with how ES/COM+ is using a combination of .Net Remoting and COM Interop over DCOM to marshal the exceptions.
As I mentioned before, please read this article to get a really good look at how Enterprise Services works underneath. I can remember spending hours using ILDASM, Anikrino, and Rotor code to try to figure out what was going on underneath. I figured out you really need to know and understand Advanced .Net Remoting, COM Interop, as well as basic COM+ to figure out the plumbing of Enterprise Services, and this article confirmed that and a lot more. Of course, Enterprise Services hides a lot of that, as it should, but you still need to be aware of what's happening when you cross the wire.
Filed under: ASP.NET, COM+/Enterprise Services, .NET Remoting, ADO.NET, .NET, Security, Database Development, CLR, Architecture/Patterns, COM Interop