473,395 Members | 1,616 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,395 software developers and data experts.

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 1336
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
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
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
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
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
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
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
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
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
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
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...
0
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...

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.