Getting exceptions from child domain to parent domain
I'm trying to figure out how I can get all unhandled exceptions from a child appdomain to the parent domain.
Just hooking childDomain.UnhandledException
doesn't work since it seems to be executed in the childDomain.
An开发者_运维知识库d I've played around with domain.DoCallback
but I can't figure out how do use it to get the exception back.
All ideas are most welcome.
I had forgot to make the class that I used in AppDomain.CreateInstanceAndUnwrap
to inherit MarshalByRefObject
. Everything works fine after doing so.
精彩评论