We can prevent deadlock in threading by using the below methods1) lock2) monitor3) interlocked classes4) wait handlers
Every .net program is executed by a clr. clr will be executing multiple programs at the same time.it is important to ensure that one process should not affect the other. an application domain is a mechanism to provide this isolation between process/programs. we will be able to configure application domain for each process and also different security levels can set.
There are 2 different ways to achieve this1) server activated objects (sao)2) client activated objects (cao) sao – sao has two different modes to create objects1) single call – every call will create an object on the server. 2) single call – a single object will be created and will be used in subsequent callscao in cao client will hold a proxy of the server object
1) by using new keyword2) using activator.createinstance() method
Cao is stateful in nature. the client creates a proxy of the server object. so it is sateful.