473,386 Members | 1,712 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 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 2476
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Daylor | last post by:
in win32 process , when u create new process,u have new main thread. i know,appDomain r logical procces,that exists in 1 win32 process. the q: is there way to create second appDomain (the...
7
by: José Joye | last post by:
I have a windows service where I create another appdomains. In the newly created AppDomain, I make use of a C library. If I issue an Abort(1) within this library, it simply hard stop my main...
4
by: Mirano | last post by:
Hi everybody. I load an assembly into another AppDomain, not a default one. As there is no way to unload the assembly, I need to unload the domain. This is where the app hangs. The problem is...
4
by: benben | last post by:
What is exactly the difference b/w an AppDomain and a Process, they seem to me very much the same -- boundary for an execution context with protected resources. ben
0
by: Dan | last post by:
We have a simple ASP.NET page that calls through Interop to a C++ COM DLL. I'm wondering what is the best way to manage the need to periodically update the COM DLL version -- hopefully without...
6
by: pradeep_TP | last post by:
Hi all, I am using IIS 5.0 and this question is regarding working of ASP.net worker process. I have only one web application right now on my web server. This means that only one AppDomain will...
0
by: Vince | last post by:
My current project (a desktop application that’s currently developed on .net v1.1) call for 1) Use ngen.exe to improve the startup speed. 2) Use multiple AppDomain to reduce the memory...
1
by: José Joye | last post by:
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.