473,569 Members | 2,704 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Unhan dledException in my secondary AppDomain
- in my primary AppDomain, I have registered to the AD2.UnhandledEx ception
// 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 2484
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.Unhan dledException in my secondary AppDomain
- in my primary AppDomain, I have registered to the AD2.UnhandledEx ception
// 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
6189
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 first 1 is the defualt appDomain) with his new ("main") thread ? if not ,what is the easy and clear way to create new thread on the new appDomain ?
7
2368
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 AppDomain!!!!!!!!!!!!How could I prevent my main AppDomain to stop when the other stopped?Thanks a lot,José
4
6084
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 this assembly has references to one dll, currently not performing any work. I tried this: 1. Setting the assembly to null, 2. Implementing a...
4
15975
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
1160
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 stopping the web server. In classic ASP, one way to accomplish this is to define the web application to run in High Isolation mode. This causes it to...
6
2883
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 be created inside a single worker process. NOw for example, due to some reason, my web application generated a stack overflow error and crashed my...
0
1123
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 requirement. The idea is some of the modules in the application are quite large and users could be working on multiple modules during a single application...
1
1858
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 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,...
0
7698
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7924
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8122
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
5513
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1213
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.