c# - Problem with policy file for ActionScript 3 XMLSocket -


We have developed a tailored server in .NET to host some basic chat / IM functions for our website, and The client is written in Flex (AS3) using XMLSocket.

We now have 2 servers, which are purely dedicated to sending policy files, and are supposed to handle an IM / chat function.

The problem is, we look at client connecting, the policy file is sent, but then ignores the Flash policy file and requests it again from our Chat / IM server.

Policy file:

  & lt;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Cross-domain-policy & gt; & Lt; Site control permission-cross-domain-policies = "master-only" /> & Lt; Permission-access-= "*" from domain-to-port = "*" secure = "wrong" /> & Lt; / Cross-domain-policy & gt;  

Policy Server:

  Server.logmasase ("Policy Server: Servicing Policy File."); TCP listener listener = (TCPLSTNER) AR Asyncstate; Socket Client = Listener Endexcepts (AR); NetworkStream NS = New NetworkStream (Client); Streamer sr = new streamrider (ns); StreamWriter SW = new streamer (ns); Sr.read (); // Send policy sw.Write (Server.EncodeString (Server.xmlPolicyFile.OuterXml) + "\ 0"); Sw.flush (); Ns.Flush (); // cleanup sw.Close (); Sr.Close (); Ns.Close (); // Do it again! Tcl.BeginAcceptSocket (Accept Callback, TCL);  

Cross domain policy only works on the server for this ... you do not Can a server serve the policy for a different server ... Do you have to stop a villain and steal your data to create a policy for your machine?

You will need a policy from the right server.


Comments