I have created a SL4 project that when a button "Connect" is pressed it created a TCP connection to my embedded device so i can pass information back and forth. THis works just fine in debug mode. When i go to release and try it, it of course requests the
policy file on port 943. I have created a second listening socket for this port and reply back with the following file when the "<policy-file-request/>" comes in.I have used a packet sniffer, and i can see that i am trully sending the policy file back, but
it still does not allow me to then create the TCP socket connection as before. I have suceesfully done this same thing using Flex, so i have knowledge about doing this. Just that i am new to SL and cannot get this to work as i have in adobe Flex.
Hi. The problem is that the flash policy file (crossdomain.xml) only works for the high-level classes (like WebClient). It does not work for the classes in the sockets namespace (more info
To make this work, you need to provide Silverlight's own policy file format, as "clientaccesspolicy.xml" in the root of your server. On the same page I linked to above you can find a "sample policy file for sockets" (scroll down to the bottom) as a good