About the Author |
|
xv | |
About the Technical Reviewers |
|
xvii | |
Acknowledgments |
|
xix | |
Introduction |
|
xxi | |
|
Introducing .NET Remoting |
|
|
1 | (14) |
|
|
1 | (5) |
|
|
2 | (2) |
|
Evolution of Distributed Systems |
|
|
4 | (2) |
|
|
6 | (8) |
|
|
7 | (1) |
|
|
8 | (1) |
|
|
9 | (1) |
|
|
10 | (4) |
|
|
14 | (1) |
|
|
15 | (28) |
|
|
15 | (7) |
|
Classes Associated with Marshaling |
|
|
16 | (1) |
|
|
17 | (2) |
|
.NET Remoting Code Example |
|
|
19 | (3) |
|
Marshaling User-Defined Objects |
|
|
22 | (4) |
|
Marshaling User-Defined Objects by Value |
|
|
22 | (3) |
|
Marshaling User-Defined Objects by Reference |
|
|
25 | (1) |
|
|
26 | (10) |
|
|
26 | (4) |
|
|
30 | (1) |
|
Dynamically Publishing Server-Activated Objects |
|
|
31 | (5) |
|
|
36 | (6) |
|
A Closer Look at Leased-Based Lifetimes |
|
|
36 | (2) |
|
|
38 | (1) |
|
|
39 | (3) |
|
|
42 | (1) |
|
|
43 | (56) |
|
A Closer Look at the Sink Chain |
|
|
43 | (5) |
|
|
44 | (1) |
|
Channel Sink Interfaces and Classes |
|
|
45 | (2) |
|
Client Channel Sink Providers |
|
|
47 | (1) |
|
Customizing the Sink Chain |
|
|
48 | (23) |
|
|
48 | (4) |
|
Adding a New Client Channel Sink |
|
|
52 | (7) |
|
Replacing the Formatter Sink |
|
|
59 | (3) |
|
Adding a Custom Formatter |
|
|
62 | (9) |
|
|
71 | (12) |
|
Defining a Custom Serialization Format |
|
|
72 | (11) |
|
Channels with Custom Transport Protocols |
|
|
83 | (15) |
|
|
83 | (1) |
|
Implementing a Custom TCP/IP Socket Channel |
|
|
84 | (14) |
|
|
98 | (1) |
|
Configuration and Deployment |
|
|
99 | (28) |
|
|
99 | (11) |
|
Standard Configuration File Types |
|
|
100 | (1) |
|
Configuration File Structure |
|
|
100 | (5) |
|
Loading a Configuration File |
|
|
105 | (5) |
|
|
110 | (5) |
|
Using Interface-Only Assemblies |
|
|
111 | (2) |
|
|
113 | (2) |
|
|
115 | (8) |
|
Hosting in a Windows Service |
|
|
115 | (4) |
|
|
119 | (4) |
|
|
123 | (2) |
|
Assigning a Version Number |
|
|
123 | (1) |
|
Determining the Version to Use |
|
|
124 | (1) |
|
|
124 | (1) |
|
|
125 | (2) |
|
|
127 | (32) |
|
Simple Asynchronous Remoting |
|
|
127 | (11) |
|
Implementing a Slow Synchronous Process |
|
|
128 | (2) |
|
Implementing a Slow Asynchronous Process |
|
|
130 | (5) |
|
Implementing a Slow Asynchronous Remote Process |
|
|
135 | (3) |
|
Using Events with Asynchronous Remote Processes |
|
|
138 | (16) |
|
Generating Events in a Single Application Domain |
|
|
139 | (2) |
|
Passing Events Between Remote Applications |
|
|
141 | (8) |
|
Multiuser Asynchronous Remote Applications |
|
|
149 | (5) |
|
Using Call Contexts with Asynchronous Remoting |
|
|
154 | (3) |
|
Using Call Contexts in the Teleconference Application |
|
|
154 | (3) |
|
|
157 | (2) |
|
Debugging and Error Handling |
|
|
159 | (50) |
|
Common Exceptions in Remoting Applications |
|
|
159 | (10) |
|
Illustrating Common Remoting Exceptions |
|
|
160 | (9) |
|
Diagnosing and Preventing Errors in Remoting Applications |
|
|
169 | (22) |
|
Implementing the Bank Application |
|
|
170 | (13) |
|
Dealing with Errors in the Client |
|
|
183 | (2) |
|
Dealing with Errors in the Remote Object |
|
|
185 | (4) |
|
Improving the Bank Application |
|
|
189 | (2) |
|
Defining Custom Exception Classes for Remote Objects |
|
|
191 | (7) |
|
Defining Exception Classes in the Exception Inheritance Hierarchy |
|
|
191 | (1) |
|
Exceptions and Serialization |
|
|
192 | (2) |
|
|
194 | (3) |
|
Defining Informational Properties and Methods |
|
|
197 | (1) |
|
Logging Error Information at the Server |
|
|
198 | (9) |
|
|
198 | (2) |
|
Logging Errors to a Database |
|
|
200 | (3) |
|
Logging Errors to the Windows Event Log |
|
|
203 | (4) |
|
|
207 | (2) |
|
|
209 | (14) |
|
|
209 | (3) |
|
|
210 | (2) |
|
|
212 | (1) |
|
|
213 | (5) |
|
|
213 | (1) |
|
|
214 | (1) |
|
|
214 | (1) |
|
|
215 | (3) |
|
|
218 | (1) |
|
|
219 | (2) |
|
|
220 | (1) |
|
|
221 | (1) |
|
|
221 | (1) |
|
|
221 | (1) |
|
|
221 | (1) |
|
|
221 | (2) |
|
Examining Assemblies, Objects, and Types |
|
|
223 | (28) |
|
Examining Assembly Metadata |
|
|
223 | (7) |
|
|
225 | (5) |
|
|
230 | (4) |
|
|
230 | (1) |
|
|
231 | (3) |
|
Examining Class Member Metadata |
|
|
234 | (16) |
|
|
235 | (3) |
|
|
238 | (2) |
|
|
240 | (2) |
|
|
242 | (1) |
|
|
243 | (2) |
|
The ConstructorInfo Class |
|
|
245 | (1) |
|
|
246 | (1) |
|
|
247 | (3) |
|
|
250 | (1) |
|
|
251 | (28) |
|
Why Invoke Members Using Reflection? |
|
|
251 | (1) |
|
Invoking Members Dynamically |
|
|
252 | (20) |
|
Invoking Class Members Using the Info Classes |
|
|
252 | (4) |
|
Invoking Class Members Using InvokeMember() |
|
|
256 | (16) |
|
Reflective Invocation at a Price |
|
|
272 | (6) |
|
|
273 | (5) |
|
|
278 | (1) |
|
|
279 | (22) |
|
|
279 | (6) |
|
Creating Assembly References |
|
|
280 | (2) |
|
Methods Used for Dynamic Assembly Loading |
|
|
282 | (1) |
|
Instantiating Classes Dynamically |
|
|
283 | (2) |
|
|
285 | (15) |
|
Implementing the Abstract Factory Pattern with Dynamic Assembly Loading in VB .NET |
|
|
289 | (11) |
|
|
300 | (1) |
|
|
301 | (42) |
|
|
302 | (13) |
|
Syntax for Using Attributes |
|
|
304 | (7) |
|
Testing a Data Type for Standard Attributes |
|
|
311 | (4) |
|
Using Predefined .NET Attributes |
|
|
315 | (17) |
|
Understanding Attribute Class Definitions |
|
|
316 | (6) |
|
Using Attributes to Control the Compiler |
|
|
322 | (5) |
|
Defining and Using Assembly Attributes |
|
|
327 | (5) |
|
Defining New Custom Attributes |
|
|
332 | (8) |
|
|
340 | (3) |
|
|
343 | (54) |
|
Investigating the .NET Component Model |
|
|
344 | (14) |
|
Components, Controls, and Classes |
|
|
344 | (1) |
|
Using Reflection with the Component Model |
|
|
345 | (13) |
|
|
358 | (37) |
|
Defining a Component Class |
|
|
359 | (5) |
|
Storing Components in a Container |
|
|
364 | (8) |
|
Using Components in VS .NET |
|
|
372 | (3) |
|
Defining Properties and Events for a Component |
|
|
375 | (6) |
|
Defining Converter Classes for Components |
|
|
381 | (11) |
|
Testing the Final Employee Component Class |
|
|
392 | (3) |
|
|
395 | (2) |
|
|
397 | (24) |
|
|
397 | (13) |
|
|
398 | (1) |
|
|
399 | (1) |
|
|
400 | (10) |
|
Thread Support in Visual Basic .NET |
|
|
410 | (9) |
|
|
411 | (7) |
|
Thread Management and the .NET Runtime |
|
|
418 | (1) |
|
|
419 | (2) |
|
|
421 | (48) |
|
System.Threading Namespace |
|
|
421 | (21) |
|
|
422 | (2) |
|
|
424 | (3) |
|
ThreadStart and Execution Branching |
|
|
427 | (2) |
|
Thread Properties and Methods |
|
|
429 | (2) |
|
|
431 | (3) |
|
|
434 | (2) |
|
Spinning Threads with Threads |
|
|
436 | (6) |
|
|
442 | (15) |
|
Putting a Thread to Sleep |
|
|
443 | (2) |
|
|
445 | (2) |
|
Pausing and Resuming Threads |
|
|
447 | (6) |
|
|
453 | (2) |
|
|
455 | (2) |
|
Why Not Thread Everything? |
|
|
457 | (1) |
|
|
458 | (4) |
|
|
458 | (3) |
|
Accessing External Resources |
|
|
461 | (1) |
|
|
462 | (6) |
|
Execution Order Revisited |
|
|
463 | (2) |
|
|
465 | (3) |
|
|
468 | (1) |
|
|
469 | (50) |
|
Why Worry About Synchronization? |
|
|
469 | (3) |
|
Synchronize Critical Sections |
|
|
470 | (1) |
|
Making the Account Object Immutable |
|
|
471 | (1) |
|
Using a Thread-Safe Wrapper |
|
|
472 | (1) |
|
.NET Synchronization Support |
|
|
472 | (1) |
|
.NET Synchronization Strategies |
|
|
473 | (25) |
|
|
473 | (1) |
|
Synchronized Code Regions |
|
|
474 | (14) |
|
|
488 | (10) |
|
Synchronization and Performance |
|
|
498 | (1) |
|
|
498 | (3) |
|
|
501 | (17) |
|
Writing Your Own Thread-Safe Wrappers |
|
|
501 | (9) |
|
A Database Connection Pool |
|
|
510 | (8) |
|
|
518 | (1) |
|
|
519 | (16) |
|
Multiple Threads in Applications |
|
|
519 | (1) |
|
|
520 | (1) |
|
|
521 | (12) |
|
Specifying the Threading Model |
|
|
522 | (1) |
|
Designing Threaded Applications |
|
|
522 | (2) |
|
|
524 | (9) |
|
|
533 | (2) |
|
Scaling Threaded Applications |
|
|
535 | (28) |
|
|
535 | (2) |
|
The Need for Thread Pooling |
|
|
536 | (1) |
|
The Concept of Thread Pooling |
|
|
536 | (1) |
|
|
537 | (2) |
|
The Role of the CLR in Thread Pooling |
|
|
537 | (1) |
|
Glitches Involved in Thread Pooling |
|
|
538 | (1) |
|
The Size of a Thread Pool |
|
|
538 | (1) |
|
Exploring the ThreadPool Class |
|
|
539 | (3) |
|
Programming the Thread Pool in VB .NET |
|
|
542 | (5) |
|
|
547 | (14) |
|
|
548 | (13) |
|
|
561 | (2) |
|
Debugging and Tracing Threads |
|
|
563 | (30) |
|
Creating the Application Code |
|
|
564 | (1) |
|
|
564 | (6) |
|
Visual Studio .NET Debugger |
|
|
565 | (3) |
|
Stepping Through the Code |
|
|
568 | (1) |
|
|
568 | (2) |
|
|
570 | (1) |
|
|
570 | (14) |
|
The System.Diagnostics.Trace Class |
|
|
571 | (3) |
|
Using Different Listener Applications |
|
|
574 | (5) |
|
|
579 | (4) |
|
|
583 | (1) |
|
|
584 | (7) |
|
|
584 | (5) |
|
|
589 | (1) |
|
|
589 | (2) |
|
|
591 | (2) |
|
|
593 | (26) |
|
|
593 | (2) |
|
|
594 | (1) |
|
System.Net.Sockets Namespace |
|
|
595 | (1) |
|
Creating the Sample Application |
|
|
595 | (23) |
|
|
596 | (1) |
|
|
597 | (18) |
|
|
615 | (3) |
|
|
618 | (1) |
Index |
|
619 | |