<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*" />
</cross-domain-policy>
Attached is the crossdomian file I placed in WebContent folder. Below is the action script code I am using to set the policy file and send an AMF call.
private function init():void
{
var hostPath:String=HTTPUtil.getProtocol()+"//"+HTTPUtil.getHostName()+":"+HTTPUtil.getPort();
var policyFile:String=hostPath+"/Reports/crossdomain.xml";
Security.loadPolicyFile(policyFile);
Alert.show(policyFile);
var cs:ChannelSet = new ChannelSet();
var customChannel:Channel = new AMFChannel("my-amf","http://localhost:9081/Reports/messagebroker/amf");
cs.addChannel(customChannel);
divisionStrategiesRO.channelSet = cs;
divisionStrategiesRO.viewDivisionStrategies();
}
When tried loading the page I get the below error.
Channel.Security.Error error Error #2048: Security sandbox violation: http://ffrtp1s.dist.abc.com:9081/Reports/flex/swf/svp/DivsionDrop.swf cannot load data from http://localhost:9081/Reports/messagebroker/amf. url: 'http://localhost:9081/Reports/messagebroker/amf'
Let me know if we can get some help to fix this issue.
I am trying to load the JSP using spring-BlazeDS and I get the above error. My url in the browser is http://ffrtp1s.dist.abc.com:9081/Reports/showreports.jsp
both ffrtp1s.dist.abc.com and localhost point to the same machine and I am launching the browser in the same machine. If I use localhost in place of ffrtp1s.dist.abc.com then it is working fine.We will be deploying the application in remote server in few days and the dns is mmapped to hide the port and hostname and we are sure we will face the same error above.
Let me know if we can get some help to fix this issue.