473,473 Members | 1,933 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

working with multiple app domains

1 New Member
I have this interesting problem. I am creating multiple domains using AppDomain.ExecuteAssembly. I created domains App1, App2 and App3 (in the same order). If I close App1, both App2 and App3 close immediately. If you close App2, it will close App3 but not App1. It won't affect App1 and App2 if I close App3. I think they are kind of having parent-child relation. I wonder how to avoid this. I want to close only A, not B and C.


Thanks in advance.

private int i = 0;

private void button1_Click(object sender, EventArgs e)
{
MethodInvoker m = (MethodInvoker)delegate()
{
Evidence ev1 = AppDomain.CurrentDomain.Evidence;

AppDomainSetup domaininfo = new AppDomainSetup();
string appPath = Application.ExecutablePath;

i++;
string appName = "App" + i.ToString();

domaininfo.ApplicationName = appName;
domaininfo.ApplicationBase = "file:///" + System.Environment.CurrentDirectory;

AppDomain d = AppDomain.CreateDomain(appName, ev1, domaininfo);
d.InitializeLifetimeService();

d.ExecuteAssembly(@"C:\projects\WindowsApplication 2\bin\Debug\WindowsApplication2.exe");
MessageBox.Show("Closing " + appName);
};
this.BeginInvoke(m);
}
Apr 26 '06 #1
0 1127

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Fred Palmer | last post by:
Hi all, Can anyone point out some best practices for handling cookies with multiple domains aliases? The problem is that I've got a site with multiple domain aliases and I want them to all...
6
by: Ludvig | last post by:
I have various domains using the same application/assembly They differ in contents and design, based on a "site id", and get its information from an SQL server. Now I have to deploy the...
4
by: Ryan | last post by:
I am developing an application using ASP.NET 2.0. In this application, I need to provide customized database-driven interfaces based on the domain name that the user is accessing the application...
22
by: Brett Romero | last post by:
If my UI app uses three DLLs and two of those DLLs reference something named utilities.dll, does the UI app load utilities.dll twice or does the compiler recognize what is going on and load...
1
by: mindflower | last post by:
Hi, i have a web application running on multiple web domains. I'm looking for the best way to cache data across these multiple domains. The System.Web.Caching.Cache only supports caching over a...
13
by: Samir Chouaieb | last post by:
Hello, I am trying to find a solution to a login mechanism for different domains on different servers with PHP5. I have one main domain with the user data and several other domains that need...
18
by: BDE Consulting | last post by:
I am going crazy. This has been a problem now for over a year and I have yet to figure out what is causing it. I have a single server that is running multiple domains. For this example I will...
6
by: josequinonesii | last post by:
I've searched, I've read, I've tested and re-read numerous post but to no avail yet... Quite simply, the settings I've applied to my httpd.conf, httpd-vhost.conf and my hosts files simply does not...
3
by: teddarr | last post by:
I have a Windows Server 2003. I am trying to run multiple websites on the server. I have 3 different websites I'd like to run. Currently the default website is working but no others. All...
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,...
0
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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...

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.