Advanced .NET Remoting [aPress]
by Ingo Rammer

Review By Peter A. Bromberg, Ph.D.
Printer - Friendly Version

Peter Bromberg
Without a doubt, one of the most exciting features for cutting - edge .NET Framework programmers (and perhaps also one of the least understood) is the built - in Remoting Infrastructure. "Remoting", by its very name, sounds somewhat intimidating and "far off", doesn't it? Fortunately, we have professional author / guru types like Ingo Rammer to present and explain these technologies in a manner that is both non threatening, logical, and exciting. There are well over 100 .NET related books in the marketplace today, with dozens more on the way - and for good reason! .NET is watershed, revolutionary technology. It doesn't matter that it comes from "Microsoft". What matters is what it is and what you can do with it! And of all the .NET books I've read and reviewed (dozens at this point), Advanced .NET Remoting, by Ingo Rammer, clearly has earned a position in the very TOP TEN of those books, in my opinion.

Let me explain why Remoting is so important:  The ability to make remote procedure calls over the wire is basic to virtually all programming technologies that have evolved past the primitive "client-server" architecture. As Rammer explains, stability, security, versioning and the ability to transfer object-oriented structures were not supported by these earlier technologies.

However, the Microsoft .NET Framework was designed with these requirements in mind - they didn't have to be "retrofitted" or "cobbled on" as an afterthought. Remoting is the logical extension (and in many ways represents significant improvements) to the XML Webservices model that has become so ubiquitous for programmers today.

Although I do not know Ingo Rammer personally, i have corresponded with him a number of times and every time I have received generous and illuminating advice on several topics. I feel that this person is my friend, and after you read this book, so will you! If you visit the remoting newsgroup at Microsoft, you will see dozens of helpful posts and responses by Rammer to various questions.

In Chapter 1of Advanced .NET Remoting, Rammer explains the evolution of distributed computing and explains how remoting is to WebServices as ASP was to CGI - allowing the programmer to work with stateful objects, flexible and customizable transfer mechanisms, and interfaces that can be extracted from running servers or any .NET assembly.

In Chapter 2, Mr. Rammer explains shared interfaces, the Generated Metadata Assembly, and how the ISerializable interface (which should be considered as a decoration for virtually all classes) supports the native encoding / decoding of objects across Application Domains and even across platforms via XML. He explains the concept of Lifetime Management and walks you through your first working Remoting sample application.

Chapter 3 focuses on the types of Remoting covering ByValue and MarshalByRef objects, as well as Server Activated Objects, SingleCall vs. Singleton and Published Objects. He also takes us on a guided tour of that most remarkable utility, SOAPSUDS. Rammer also explains the Factory design pattern. Client - Activated Objects, types of invocation and Synchronous vs. Asynchronous calls with delegates are concisely covered here. You'll also learn about asynchronous one-way calls and multiserver configuration, with shared implementation, shared Interfaces and shared base classes rounding out the chapter. By the time you finish Chapter 3 and work through the examples, you will know more than 95% of all developers about the remoting infrastructure! But there is much more.

In Chapter 4, Rammer covers configuration and deployment in depth with configuration files and even porting to Windows Services. This was especially useful to me as I was able to use one of his code examples to create a proof - of - concept Windows Service to test some theories on getting socket calls "out of the ASP.NET AppDomain".

Chapter 5 covers Security for Remoting with IIS, roles, and even SSL. This chapter should have a calming effect on many developers (and their managers as well).

Chapter 6 is where Ingo Rammer kicks in the "Afterburners" - dealing with In-Depth .NET Remoting. We learn to manage lifetimes, understand leases, work with Sponsors, versioning, the GAC, remoting events, and more.

In Chapter 7, we get a true look inside the Framework with the Five Elements of Remoting (sounds kind of like and Your Mantra is..., doesn't it). You'll examine Message Sinks, Client - Side and Server - Side Messaging, and all about Asynchronous Messaging.

Chapter 8 basically covers understanding Sink Providers, and Chapter 9 shows us how to extend with Compression using Mike Kruger's NZLib (I've written several articles here on about using it), and even custom sinks and providers such as with MSMQ or SMTP/POP3. Encryption is also covered, as well as how to use a custom Proxy.

In Chapter 10, Ingo Rammer shows us how to develop a Transport Channel using remoting with SMTP / POP3.

Finally, in Chapter 11, Rammer concludes with treatment of undocumented techniques in how to use the Remoting Framework to develop custom Attributes to intercept calls, do checking or validation, and more. If you visit, you will see that entrepreneurs have embraced the remoting infrastructure. There is at least one implementation of a custom transport channel using Named Pipes for your downloading pleasure.

As a special bonus, I was informed by Ingo just prior to beginning this book review that all source code samples for the book will also be downloadable in VB.NET. This will include the world's first public remoting transfer channel implementation in VB.NET.

And (even more important), there's going to be a second edition of this book: "Advanced .NET Remoting - VB.NET Edition" which will be published in the not so distant future. So if you are a C#-a-phobe, fear not!

This is not a book for beginners. But if you've got your heart and soul in .NET as I do (and certainly Ingo Rammer does), you need to get yourself a copy of this excellent work. Highly recommended!

Peter Bromberg is an independent consultant specializing in distributed .NET solutions Inc. in Orlando and a co-developer of the developer website. He can be reached at