How to create 2nd AppDomain?

J

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top