This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!
References Between Application Domains
The code loaded in one application domain cannot directly access code or resources from another application in another application domain. The NGWS runtime enforces this by not allowing direct calls between objects in different application domains.
Isolation between domains is also required for security reasons. If a caller in one domain could compromise code in another domain, the potential exists to maliciously breech security.
Objects that pass between domains are either copied or accessed via proxy. The mechanism for determining how objects are accessed across domains is determined by the object. There are three cases:
- Unbound objects are marshaled by value across application domains. That is, a copy is made of the object and the receiver manipulates the copy, not the original object.
- Application-domain bound objects are marshaled by reference across application domains. As such, cross application domain access is always through proxies.
- Context-bound objects are also marshaled by reference across application domains. They are marshaled by reference between contexts in the same domain as well.