Hi
I am facing problem in XMLSocket conection. Please see the below of my
issue
first i have tried to connect one port(small part of my code)
HOST="localhost";
port="8010";
var currentSocket:XMLSocket=new XMLSocket();
Security.loadPolicyFile("xmlsocket://"+HOST+":"+port);
currentSocket.connect("localhost",port);
CASE1 :server is running
it is working fine. I am able to connect , able to send policy
request and getting data from the server
CASE1 :server is down
i try to connect to the port it fails.
I have given addEventListener for currentSocket
currentSocket.addEventListener(SecurityErrorEvent.SECURITY_ERROR,securityErrorHandler);
In securityErrorHandler method i have given some logic to run the
server(to open the port). It is successfully starting server.So the
port will open now . Then i am trying to connect again in same
flow .it is giving
Error #2044: Unhandled SecurityErrorEvent:. text=Error #2048: Security
sandbox violation: http://localhost/flex/client/mainApp-debug.swf
cannot load data from localhost:8010.
It is not sending policy request to server even I explicitly call to
load policy file using Security.loadPolicyFile("xmlsocket://"+HOST
+":"+port);
I think flex/flash player cache data about this port when we call
first time.and it is rely on this data for second time and not even
calling server for policy request. I am not sure about it. but i
think i we can clean this cache we may success.
please help me
thanks advance
Kishore.V