Chapter 9: Implementing Reliable Sessions


Overview

After completing this chapter, you will be able to:

  • Explain how to implement reliable sessions in a WCF service and client application.

  • Describe how the WS-ReliableMessaging protocol works with the WCF runtime.

  • Create a custom binding that implements replay detection.

Most of the time, apart from when you are performing the exercises in this book, when you build WCF client applications and services, you will expect them to be deployed to different computers and communicate with each other across a connecting network. This is a principal reason for using WCF, after all. Aside from security issues, the other main problem with networks is that they can be unreliable. It is very easy for a cable or wireless connection to be interrupted and for messages to be intercepted, interfered with, or just lost. This is clearly unacceptable.

Additionally, if a WCF service is running using the PerSession service instance mode, a conversation between a client application and the WCF service can comprise several messages. In a wide area network such as the Internet, different messages can take different routes when traveling to their destination, and so it is possible for messages to arrive in a different sequence from that in which they were sent. It could be important for a service to process messages in the same order that the client sent them, rather than the order that they were received, so the client application and service must agree on a protocol to use for indicating the order of messages.

Messages traveling across an open network are vulnerable. They can be intercepted, corrupted, diverted, or have a variety of other nasty things happen to them. Several of the Web service (WS-*) specifications are intended to help protect messages, and you have seen how WCF implements some of these specifications in earlier chapters. Another specification that is relevant when you need to send messages reliably is WS-ReliableMessaging. Another common security issue is the “replay attack,” in which a third party intercepts messages and repeatedly forwards them on to the intended destination.

In this chapter, you will look at the ways in which you can use WCF to provide reliable messaging and configure replay detection.




Microsoft Windows Communication Foundation Step by Step
Microsoft Windows Communication Foundation Step by Step (Step By Step Developer Series)
ISBN: 0735623368
EAN: 2147483647
Year: 2007
Pages: 105
Authors: John Sharp

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net