R – How to use sockets in Silverlight 2

silverlight-2.0sockets

I am trying to implement a Silverlight 2 client application that takes data from a server via socket-based communication.

I've heard that in Silverlight 2, this process is more complicated due to the fact that it is required to use a policy server, and that could slow down my application, not to mention that each string passed through the socket would have to be checked with the policy server.

I'm wondering if this is indeed the case, and if writing the server is going to be a mammoth task. Do you recommend staying with Silverlight 1? I'm aware that in Silverlight 1, socket communication has to be done in ASP.NET. I was aiming for the client logic to be done in C#, but with Silverlight 1, I believe I can only use Javascript and communicate with ASP.NET…

Thanks for any replies!

Best Answer

According to documentation, you can use sockets to connect to the server the Silverlight app was downloaded from right away. If you need to connect using sockets to another server, you need to supply a policy file.
This MSDN article describes how to create the policy file.