Hello again. Thought I’d review what I have tried doing the last day or two to try and solve this cross-domain policy problem.
What I am running: ( all of these are in a Eclipse )
- Java Flash Server that listens for a connection on port 843 and then sends the crossdomain.xml file over TCP. Uses a Server Socket and Socket connection classes.
<!DOCTYPE cross-domain-policySYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<allow-access-from domain="*" to-ports="*"/>
- Java Ping Server that sends out a string “PING!” every five seconds. Uses ServerSocket and Socket to listen for connection.
- Flex 3 Application that establishes a connection with Java Ping Server and listens for any messages; if one is received, shows it in a text box. Using XMLSocket to connect to Ping Server.
- Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: file:///C:/[dir]/bin-debug/CDApp.swf cannot load data from 127.0.0.1:12345.
- at CDApp/pingServer()[C:\sandbox\clark\CustomComp\src\CDApp.mxml:15]
- at CDApp/___CDApp_Application1_creationComplete()[C:\sandbox\clark\CustomComp\src\CDApp.mxml :3]
- at flash.events::EventDispatcher/dispatchEventFunction()
- at flash.events::EventDispatcher/dispatchEvent()
- at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.2.0\frameworks\projects\framework\src \mx\core\UIComponent.as:9298]
- at mx.core::UIComponent/set initialized()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as :1169]
- at mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.2.0\frameworks\projects \framework\src\mx\managers\LayoutManager.as:718]
- at Function/http://adobe.com/AS3/2006/builtin::apply()
- at mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.2.0\frameworks\projects\framew ork\src\mx\core\UIComponent.as:8628]
- at mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.2.0\frameworks\projects\framewo rk\src\mx\core\UIComponent.as:8568]
Attempts: ( all failed )
- With each of these attempts, Java Flash Server sent cross-domain xml as a string to Flex App:
- With the following attempts, Java Flash Server gave me no indication it received a request for policy file:
- Running it with Security.loadPolicyFile(xmlsocket://myip:843)
- I have not run it as exhaustively with xmlsocket since the Java Flash Server did not indicate it received a request.
I have read quite extensively all over Google and many Adobe articles about cross-domain.xml and setting up Flash Policy Servers. Also, I have found FlashPlayerTrust articles and have tried to implement them as well. In addition, I have altered my global flash player settings to accept anything. None of these sources have helped.
Also, our company recently bought Flex 3 licenses after experiment on the beta for Flex 4. The same problem existed there as well. I posted on the Flex 4 forums as well, and although I got suggestions on what to do, none of it worked.
Link to prior Flex 4 post:
- It could be something to do with the Eclipse environment I am developing inside of. Does anyone know of Eclipse issues with Flex TCP ( XMLSocket ) connections?
- Does my cross-domain.xml file look correct?
- I have my crossdomain file in the home directory where Orion server looks for files to load, I think that is where it is supposed to be. If not, please correct me.
Any assistance would be appreciated. Also, if you have questions about how I have implemented any of these files, please ask so I can clarity.
Thank you in advance for your response.