|
Presenting Microsoft Communication Foundation. Hands-on. Authors: McMurtry, Mercuri, Watling Published year: 2006 Pages: 25-27/132 |
SummaryData being sent from a Windows Communication Foundation client to a service is serialized to XML within the client, and data received from clients by Windows Communication Foundation services is deserialized from XML within the service. There are two XML serializers that the Windows Communication Foundation can use to accomplish the serialization to XML and deserialization from XML. One is the XmlSerializer class that has been a part of the .NET Framework class library from the outset. The other is the XmlFormatter class that is new with the Windows Communication Foundation. Whereas the XmlSerializer provides precise control over how data is represented as XML, the XmlFormatter provides very little control over that in order to make the serialization process very predictable, and, thereby, easier to optimize. As a result, the XmlFormatter outperforms the XmlSerializer . Allowing the XmlFormatter to serialize one's custom types is very simple. One merely adds a DataContract attribute to the definition of the type, and DataMember attributes to each of the type's members that are to be serialized. Implementing the IUnknownSerializationData interface in any type that is to be serialized using the XmlFormatter is wise. It allows for different versions of the same way of representing the data in XML to evolve independently of one another, yet still be usable together. |
ReferencesBallinger Keith . 2003. .NET Web Services: Architecture and Implementation . Reading, MA: Addison-Wesley. Freud Sigmund . 1977. Three Essays on Sexuality . In On Sexuality: Three Essays on Sexuality and Other Works , ed. Angela Richards. The Pelican Freud Library, ed. James Strachey, no. 7. London, UK: Penguin. |
Chapter 4. SecurityIn This Chapter
Chapter 2, "The Fundamentals," which covered the fundamentals of the Windows Communication Foundation, showed that the technology makes security simple. Just opting to use the WSHttpBinding in configuring a service ensures not only that communications with the service are kept confidential, but also that the identities of the users of the clients are conveyed to the service so that the service can evaluate whether to grant the clients access to its resources. More generally , by configuring the binding of a service, one can select how clients of the service are to be authenticated and how communications with the service are to be kept confidential. The built-in options for how a client may be authenticated are by a username and password combination, by its user 's Windows identity, and by an X.509 certificate. However, one can also define custom tokens for authenticating clients. Communications with a service can be kept confidential either by using a secure transport protocol or by having messages encrypted before being transported. All of these security facilities of the Windows Communication Foundation are well documented by the samples in the Microsoft Windows Software Development Kit (SDK) referred to in the Introduction. So those facilities are not covered in detail here. The auditing of security events is covered in Chapter 12, "Manageability." What this chapter focuses on is the Extensible Security Infrastructure (XSI) that the Windows Communication Foundation incorporates, which promises to greatly simplify the automation of business processes that extend across organizations. |
|
Presenting Microsoft Communication Foundation. Hands-on. Authors: McMurtry, Mercuri, Watling Published year: 2006 Pages: 25-27/132 |