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

Home Posts Topics Members FAQ

How to create 2nd AppDomain?

JJ
Can some one please explain me what do I need for creating a 2nd
AppDomain. I've been reading the .NET framework help and googling
around for examples, but don't really understand how the AppDomain
works.

I have a class MainForm, which is the mainprogram. The MainForm uses a
class RemotingServer which handles my remoting stuff. Now, I need to
put the RemotingServer to the a 2nd AppDomain, so that I can stop and
restart the remoting server without closing the whole serverprogram.
How do I do that? Do I need to compile the RemotingServer class into a
dll and use that somehow or...? How do I "start" and "stop" the 2nd
AppDomain. Please, can you give me a basic example how to create and
use a 2nd AppDomain with C#.

Also, I need to receive events from the 2nd AppDomain to my MainForm.
Is that possible?

I'd really appreciate any help.

Thank you.
Jul 21 '05 #1
1 1338
This faq explains much of what you need to know about appdomains.
http://www.gotdotnet.com/team/clr/AppdomainFAQ.aspx

Your questions about servers are not really appdomain questions.

"JJ" <ko******@st.jyu.fi> wrote in message
news:c6**************************@posting.google.c om...
Can some one please explain me what do I need for creating a 2nd
AppDomain. I've been reading the .NET framework help and googling
around for examples, but don't really understand how the AppDomain
works.

I have a class MainForm, which is the mainprogram. The MainForm uses a
class RemotingServer which handles my remoting stuff. Now, I need to
put the RemotingServer to the a 2nd AppDomain, so that I can stop and
restart the remoting server without closing the whole serverprogram.
How do I do that? Do I need to compile the RemotingServer class into a
dll and use that somehow or...? How do I "start" and "stop" the 2nd
AppDomain. Please, can you give me a basic example how to create and
use a 2nd AppDomain with C#.

Also, I need to receive events from the 2nd AppDomain to my MainForm.
Is that possible?

I'd really appreciate any help.

Thank you.

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2517
by: Daylor | last post by:
can i do it this way : from the defualt AppDomain : create thread. from the start function of the new thread , create new AppDomain,and then create my class through the AppDomain . this way...
4
6170
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...
4
4178
by: stu_pb | last post by:
I am designing a plugin system for a window application using .NET(C# specifically). One of the requirements of the plugin system is to be able to dynamically load/unload plugins. My initial...
8
5069
by: A. Elamiri | last post by:
Hello, I created a small app which acts as a services manager. I basically drop a DLL in a Services folder and set the frequency through the application for how often do I want the code in the...
1
316
by: JJ | last post by:
Can some one please explain me what do I need for creating a 2nd AppDomain. I've been reading the .NET framework help and googling around for examples, but don't really understand how the AppDomain...
1
1729
by: Andrew Ducker | last post by:
I'm trying to load an assembly into a temporary AppDomain rather than my main AppDomain, so that it can be unloaded later on. However, it's also loading into my main AppDomain at the same time. ...
12
8221
by: John | last post by:
I have a AppDomain ID, how do I get the instance of the AppDomain Object? Please advice. Thanks in advance. John
4
5324
by: illegal.prime | last post by:
Hi all, I'm getting unexpected results when trying to preload assemblies into an AppDomain I'm creating. Upon creation of the AppDomain - I attach an AssemblyResolve to both my current AppDomain...
0
1840
by: jeremyje | last post by:
I would like to create an application where I have many concurrent processes being managed by a monitoring process. Each process that is "managed" will be invoked from an assembly dll (think...
0
6964
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
7123
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
7175
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...
0
7319
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
5430
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,...
1
4864
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...
0
4559
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
3069
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...
0
1378
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 ...

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.