1

I am trying to implement a data push from a Windows Service to a Silverlight app. I have created a policy server which sends this policy file:

<?xml version="1.0" encoding ="utf-8"?>
<access-policy>
  <cross-domain-access>
    <policy>
      <allow-from>
        <domain uri="*" />
      </allow-from>
      <grant-to>
        <socket-resource port="8400" protocol="tcp" />
      </grant-to>
    </policy>
  </cross-domain-access>
</access-policy>

Using a TCP test tool I have verified that when I connect to port 943 and send the request, I receive back that policy file.

Also, using breakpoints in my policy server I have confirmed that the Silverlight app is reaching the service and seemingly the service sends the policy file without error.

I have also confirmed that my data push service is listening correctly on the above port.

However, somehow Silverlight's connection to my data push service is always failing with a WinSock 10013 Access Denied error.

The only thing I can think is that my policy file isn't correct, although as far as I can see it meets the spec. Let me know if you'd like me to post any of my other code. Any help would be appreciated.

Misko
  • 2,044
  • 12
  • 15

1 Answers1

2

It turns out my port was out of range. Silverlight can only connect to ports 4502-4534.

Misko
  • 2,044
  • 12
  • 15
  • I have an almost identical problem [just like this](http://stackoverflow.com/questions/10541699/why-does-my-silverlight-socket-policy-file-not-work), but am inside of this port range. I wonder if you could take a look, since you've been down this. – DigitalJedi805 May 10 '12 at 21:29