silverlighttcpsocketspolicy-server

How do I open a socket back to port 80 in Silverlight?


Is there a way to open a TCP Socket back to a non-standard Silverlight port such as port 80?

I don't quite understand the restrictions on Silverlight ports.

I would like to open a connection back to the server of origin using any port. I can serve a policy file from port 943 if needed.


Solution

  • Microsoft restricted the ports to a range well outside the "well known ports." This prevents Silverlight from communicating directly to most web-based resources like HTTP, POP, SMTP, etc.

    The most common way to get around this is to set up a "proxy" service on your domain. The proxy accepts requests, forwards them through the port on the service you're using, and returns the result.