28.12.2013 Views

Building Secure ASP.NET Applications - People Search Directory

Building Secure ASP.NET Applications - People Search Directory

Building Secure ASP.NET Applications - People Search Directory

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 11: .<strong>NET</strong> Remoting Security 263<br />

●<br />

●<br />

●<br />

HttpChannel. This channel is designed to be used when you host a remote object<br />

in <strong>ASP</strong>.<strong>NET</strong>. This channel uses the HTTP protocol to send messages between the<br />

client and the server.<br />

TcpChannel. This channel is designed to be used when you host a remote object<br />

in a Microsoft® Windows® operating system service or other executable. This<br />

channel uses TCP sockets to send messages between the client and the server.<br />

Custom channels. A custom transport channel can use any underlying transport<br />

protocol to send messages between the client and server. For example, a custom<br />

channel may use named pipes or mail slots.<br />

Comparing Transport Channel Sinks<br />

The following table provides a comparison of the two main transport channel sinks.<br />

Table 11.1: Comparison of TcpChannel and HttpChannel<br />

Feature TCP Channel HTTP Channel Comments<br />

Authentication No Yes The HTTP channel uses the authentication<br />

features provided by IIS and <strong>ASP</strong>.<strong>NET</strong>,<br />

although Passport and Forms authentication<br />

is not supported.<br />

Authorization No Yes The HTTP channel supports the authorization<br />

features provided by IIS and<br />

<strong>ASP</strong>.<strong>NET</strong>. These include NTFS<br />

permissions, URL authorization and File<br />

authorization.<br />

<strong>Secure</strong> Yes Yes Use IPSec with the TCP channel. Use<br />

Communication<br />

SSL and/or IPSec with the HTTP channel.<br />

Custom Sinks<br />

Custom channels sinks can be used at different locations within the channel sink<br />

pipeline to modify the messages sent between the client and the server. A channel<br />

sink that provides encryption and decryption is an example of a custom channel sink.<br />

Formatter Sinks<br />

Formatter sinks take method calls and serialize them into a stream capable of being<br />

sent across the network. .<strong>NET</strong> supplies two formatter sinks:<br />

● Binary Formatter. This uses the BinaryFormatter class to package method calls<br />

into a serialized binary stream, which is subsequently posted (using an HTTP<br />

POST) to send the data to the server. The binary formatter sets the content-type<br />

in the HTTP request to “application/octet-stream.”

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

Saved successfully!

Ooh no, something went wrong!