Chapter 10. Networking Applications


  • Using WebClient to call for remote content

  • Dealing with cross-domain access

  • Using WCF duplex communications with Silverlight

  • Working with sockets

Because Silverlight applications are on the client side, this chapter focuses on the communication capabilities these types of applications provide. This chapter is not a guide to computer networking, but an introduction to using the .NET Framework along with Silverlight for network communication.

This chapter covers facilities provided through the .NET base classes for using various network protocols, particularly HTTP and TCP, to access networks and the Internet as a client. It covers some of the lower-level means of getting at these protocols through the .NET Framework. You will also find other means of communicating via these items using technologies such as the Windows Communication Foundation (WCF) or using REST-based services to get at remote capabilities. The two namespaces of most interest for networking are System.Net and System.Net.Sockets. The System.Net namespace is generally concerned with higher-level operations, for example, downloading and uploading files, and making web requests using HTTP and other protocols, whereas System.Net.Sockets contains classes to perform lower-level operations. You will find these classes useful when you want to work directly with sockets or protocols, such as TCP/IP. The methods in these classes closely mimic the Windows Socket (Winsock) ...

Get Professional Silverlight® 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.