Home > Articles > Microsoft > Other Microsoft

MCAD/MCSD Training Guide (70-320): .NET Remoting

Familiarize yourself with the remoting library of the .NET Framework and begin working toward creating a remotable class and hosting that class in several modes. You will also see the use of a configuration file to configure the remoting configuration for a remoting host and the remoting client.
This chapter is from the book

Objectives

This chapter covers the following Microsoft-specified objective for the "Creating and Managing Microsoft Windows Services, Serviced Components, .NET Remoting Objects, and XML Web Services" section of the "Developing XML Web Services and Server Components with Microsoft Visual C# .NET and the Microsoft .NET Framework" exam:

Create and consume a .NET Remoting object.

  • Implement server-activated components.

  • Implement client-activated components.

  • Select a channel protocol and a formatter. Channel protocols include TCP and HTTP. Formatters include SOAP and binary.

  • Create client configuration files and server configuration files.

  • Implement an asynchronous method.

  • Create the listener service.

  • Instantiate and invoke a .NET Remoting object.

  • This exam objective tests your skill on designing distributed applications with .NET remoting, which is a part of the .NET Framework SDK. You should know how to create a remote object, how to make it available to all the users via a remoting server, and how to write client applications that instantiate remote objects and invoke methods on them.

  • Remoting provides a very flexible and configurable environment to design distributed applications. By the virtue of flexibility, the .NET remoting applications can be designed in several different ways. In this exam you are required to know how to make choices for various remoting configurations, such as activation mode, channel, and formatter, for a given scenario.

  • Remoting is configurable, too. All the remoting settings can be written in an XML-based configuration file. Writing the settings in separate configuration files allows easier modification and maintenance of remoting applications. This objective requires you to know about configuration files, such as the application configuration file, the web.config file, and the machine.config file.

  • In distributed applications, methods are invoked across the network, and several factors such as network bandwidth and server availability may cause your application to respond slowly as compared to a desktop application. This exam objective also tests your skill with creating asynchronous or responsive distributed applications.

Outline

Introduction

Application Boundaries

  • Process Boundary
  • Application Domain Boundary

Distributed Applications

  • Evolution of Distributed Applications
  • Using the .NET Framework to Develop Distributed Applications

.NET Remoting Architecture

  • Object Marshaling
    • Marshal-by-value Objects
    • Marshal-by-reference Objects
  • Channels
    • HTTP Channels
    • TCP Channels
    • Choosing Between the HTTP and the TCP Channels
  • Formatters
    • The SOAP Formatter
    • The Binary Formatter
    • Channels and Formatters
  • Remote Object Activation
    • Server-Activated Objects
    • Client-Activated Objects
    • Comparing the Object Activation Techniques
  • Lifetime Leases

Applying .NET Remoting

  • Creating a Remotable Class
  • Creating a Server-Activated Object
    • Using the SingleCall Activation Mode to Register a Remotable Class As a Server-Activated Object
    • Instantiating and Invoking a Server-Activated Object
    • Using the Singleton Activation Mode to Register a Remotable Class As a Server-Activated Object
  • Creating a Client-Activated Object
    • Registering a Remotable Class As a Client-Activated Object
    • Instantiating and Invoking a Client- Activated Object
  • Using Configuration Files to Configure the Remoting Framework
    • Server-Side Configuration
    • Client-Side Configuration
  • Using Interface Assemblies to Compile Remoting Clients
    • Creating an Interface Assembly
    • Creating a Remotable Object That Implements an Interface
    • Creating a Remoting Client That Uses an Interface Instead of the Implementation
    • Using the Soapsuds Tool to Automatically Generate an Interface Assembly
    • Creating an Interface Assembly That Works with the Client-Activated Objects
  • Using IIS As an Activation Agent
  • Asynchronous Remoting
    • Understanding the Model of Asynchronous Programming in the .NET Framework
    • Applying Asynchronous Programming

Chapter Summary

Apply Your Knowledge

Study Strategies

  • Write programs to create remotable objects, remoting hosts, and remoting clients. Understand what role each of them plays in a distributed computing scenario.

  • Understand the difference between server-activated objects and client-activated objects, HTTP channel and TCP channel, SOAP formatter and binary formatter. You should be ready to answer questions that ask you to choose between these remoting elements in a given scenario.

  • Use both declarative as well as programmatic configuration for distributed applications. Appreciate the advantages and shortcomings of each approach.

  • Understand how to use the asynchronous programming techniques to make a client program responsive in spite of slow method calls across the network.

Introduction

The .NET Framework provides a platform for building next-generation distributed applications. I start this chapter by introducing distributed application and how they are different from conventional applications. The .NET Framework allows you to create distributed applications in various ways. Two popular approaches are .NET remoting and ASP.NET Web services. I discuss .NET remoting in this chapter and cover ASP.NET Web services in the next two chapters.

In this chapter, you start learning about remoting by understanding its architecture first. You'll learn about various remoting elements such as the remotable class, remoting host, remoting client, channels, formatters, activation modes, and you'll also learn how these elements fit together to create a distributed application. I compare various choices available with each of the remoting elements and explain how to decide between those choices in a given scenario.

The next part of the chapter is code-intensive. You'll write code to practice creating small but fully functional distributed applications. While working with the Step-by-Step exercises you'll develop various skills instrumental for designing remoting applications and of course also for passing this exam.

I first show you how to create a class that can be remoted across the network and application boundaries. I then show how to create a remoting host that hosts the class so that the client program can take the services offered by the remotable class. I then show how to create a client program that can instantiate a remote object and invoke methods on it.

I discuss various types of applications that can work as remoting hosts, such as a console application, a Windows service, or IIS (Internet Information Services). I also discuss how you can use configuration files to conveniently modify the behavior of both the remoting host as well as the remoting client application.

Finally I show how to program the client application to invoke remote method calls asynchronously. Asynchronous method invocations, as you'll see, boost the responsiveness of the client application and keep users happy.

sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |