Wednesday, February 17, 2010

Advantages of .NET AppDomain

You may ask, why should I create more than one application domain within my application?

The following advantages of application domains answer this question.

* In terms of isolation, code running in one application domain can not access code or resources running in another application domain.
* In terms of security, you can run more than one set of web controls in a single browser process. Each set of them is running in a separate application domain so each one can not access the data or resources of the other sets. You can control the permissions granted to a given piece of code by controlling the application domain inside which the code is running.
* In terms of robustness, fault in code running in one application domain can not affect other applications although they all are running inside the same process. Individual application domain can be stopped without stopping the entire process, you can simply unload the code running in a single application domain.

So, from the above advantages, you can observe that by using application domains you can create rather robust .NET applications. It increases isolation, stability, and security of your application.

No comments:

Post a Comment