1

In my window forms application, I create a Appdomain say sandBox. In this sandbox i excute some code Say TestMethod from TestAppdomain Class. This class is in Test.dll which is not loaded in the current appdomain (Default appdomain).

Now while executing TestMethod some exception occurs, then I want the sandbox domain to be unloaded and since AppDOmain provide Isolotion my Default Appdomain shoud not be affected.

But As i read over the internet i guess this is not possible.But could some one give me some pointer on how to achive it.

Thanks in Advance

Vikram

4

1 Answer 1

2

Yes this is certainly possible, and in fact it is the entire purpose of AppDomains. A quick Google search turns up a good resource:

Link

Above link is broken, this one provides an overview of AppDomain sharing.

Link

You may also want to look into the Managed Add-In Framework (MAF):

2
  • Yes AppDomains do Isolote. But if there is a exception in another domain then it does take down the application. I want to know how I can handle exception happening in a appdomain, and then unload it without affecting my base application. Jul 7, 2010 at 7:13
  • 2
    Put a try/catch handler around the call from the default AppDomain into the secondary AppDomain. Jul 7, 2010 at 14:55

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.