15.02.2015 Views

C# 4 and .NET 4

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

54<br />

.neT remoting<br />

WhaT ’ s in This ChaPTer<br />

➤<br />

➤<br />

➤<br />

➤<br />

➤<br />

➤<br />

➤<br />

➤<br />

➤<br />

➤<br />

An overview of .<strong>NET</strong> Remoting<br />

Contexts, which are used to group objects with similar execution<br />

requirements<br />

Implementing a simple remote object, client, <strong>and</strong> server<br />

The .<strong>NET</strong> Remoting architecture<br />

.<strong>NET</strong> Remoting confi guration fi les<br />

Hosting .<strong>NET</strong> Remoting objects in ASP.<strong>NET</strong><br />

Using Soapsuds to access the metadata of remote objects<br />

Calling .<strong>NET</strong> Remoting methods asynchronously<br />

Calling methods in the client with the help of events<br />

Using the CallContext to automatically pass data to the server<br />

This chapter explores .<strong>NET</strong> Remoting. .<strong>NET</strong> Remoting can be used for accessing objects in another<br />

application domain (for example, on another server). It provides a faster format for communication<br />

between .<strong>NET</strong> applications on both the client <strong>and</strong> the server side.<br />

In this chapter, you develop .<strong>NET</strong> Remoting objects, clients, <strong>and</strong> servers by using the HTTP, TCP,<br />

<strong>and</strong> IPC channels. First, you confi gure the client <strong>and</strong> server programmatically before you change the<br />

application to use confi guration fi les instead, where only a few .<strong>NET</strong> Remoting methods are required.<br />

You also write small programs to use .<strong>NET</strong> Remoting asynchronously <strong>and</strong> for calling event h<strong>and</strong>lers<br />

in the client application.<br />

The .<strong>NET</strong> Remoting classes can be found in the namespace System.Runtime.Remoting <strong>and</strong> its<br />

subnamespaces. Many of these classes are in the core assembly mscorlib , <strong>and</strong> some needed only for<br />

cross - network communication are available in the assembly System.Runtime.Remoting .<br />

Why use .neT remoTing<br />

.<strong>NET</strong> Remoting is a technology for communication between different application domains.<br />

Using .<strong>NET</strong> Remoting for communication between application domains can happen inside the same<br />

process, between processes on a single system, or between processes on different systems.<br />

www.it-ebooks.info

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!