471,350 Members | 1,586 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,350 software developers and data experts.

AppDomain isolation when having multiple AppDomain - How?

I'm currently trying to load an instance of a given class within a secondary
appDomain and access it from within my main AppDomain.
Everything is fine and working if the class in the second AppDomain catches
any potential exception.
However, if I throw an error within a method that is implemented in the
object running in the 2nd AppDomain, this really gets bad!!!

I have tried to register to several events:
- AppDomain.UnhandledException in my secondary AppDomain
- in my primary AppDomain, I have registered to the AD2.UnhandledException
// where AD2 is a reference to 2nd AppDomain

when an error is thrown and uncatched in 2nd domain, none of the defined
events are fired and the main application is somehow lost (it does not
terminate).
Can someone tell me how a primary domain can be informed about problem
within Domains it created so as to be able to reload them.
By the way, I'm using .Net 2.0
Thanks a lot,
José
Jun 13 '07 #1
1 2378
Please discard this thread.
In fact, I had a problem in my logic and it works as expected...

- José

"José Joye" <Me@me.coma écrit dans le message de news:
46**********************@news.sunrise.ch...
I'm currently trying to load an instance of a given class within a
secondary appDomain and access it from within my main AppDomain.
Everything is fine and working if the class in the second AppDomain
catches any potential exception.
However, if I throw an error within a method that is implemented in the
object running in the 2nd AppDomain, this really gets bad!!!

I have tried to register to several events:
- AppDomain.UnhandledException in my secondary AppDomain
- in my primary AppDomain, I have registered to the AD2.UnhandledException
// where AD2 is a reference to 2nd AppDomain

when an error is thrown and uncatched in 2nd domain, none of the defined
events are fired and the main application is somehow lost (it does not
terminate).
Can someone tell me how a primary domain can be informed about problem
within Domains it created so as to be able to reload them.
By the way, I'm using .Net 2.0
Thanks a lot,
José


Jun 13 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Mirano | last post: by
4 posts views Thread by benben | last post: by
reply views Thread by Vince | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.