0

I have an app that is trying to open a secure socket connection on a web server. I hosted a small code that servers the policy file on port 843 as is required by flash player in order to make the socket connection. But i am not receiving the specified string <policy-file-request/>, in place of it i am getting the first string that is sent to port 443 during secure socket connection.

This flash socket policy server is taking more time than actual development process. Please shed some light.

intoTHEwild
  • 448
  • 7
  • 24
  • do i need to send the specifically or flash player does it on its own ? – intoTHEwild Feb 08 '12 at 10:34
  • No you don't need to send it yourself, Flash Player will send it automatically. I noticed however that it won't send the string unless I'm running the Flash from a browser. At least it won't send it from the stand-alone debug player. – Bakapii Feb 08 '12 at 10:57
  • I am running it in the browser itself. tried everything IE, chrome, firefox but nothing worked – intoTHEwild Feb 08 '12 at 11:04
  • Just opening the SWF in the browser or via a webserver? – Bakapii Feb 08 '12 at 11:07

2 Answers2

0

Before calling connect on a Socket-object, I make this call:

Security.loadPolicyFile("xmlsocket://" + ip + ":" + port);

As I mentioned in my comment it doesn't seem to reply anything, or even send the , if I run the SWF in a FlashPlayer. But I am able to connect via socket anyway. This is not the case if I run it on a webserver however. Then it will correctly trigger a response from the SocketServer that handles PolicyRequests.

Bakapii
  • 1,014
  • 1
  • 7
  • 12
  • I hosted the flash client app on my localhost and I am trying to connect to a webserver that has a c# code that serves policy file on port 843. When i run the client app which opens a secure socket on the same webserver, i get a request on webserver on port 843 but it does not contain the '', instead i am getting the first packet that is transmitted during the secure socket connection. – intoTHEwild Feb 08 '12 at 11:43
  • i suppose it has something to do with securesocket. because if i try with normal socket i am getting '' where as with securesocket i am not. – intoTHEwild Feb 08 '12 at 13:42
0

it looks like in order to serve a policy file to secure socket you have to open secure socket on server side, a normal tcp socket wont help. Although i still have no idea why do we have to serve the policy file over SSL, it's just a way to check if the connection is allowed. anyway if you are stuck go ahead and implement a secure socket on server side.

intoTHEwild
  • 448
  • 7
  • 24