faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Security.Error error Error #2048: Security sandbox violation: http://203.72.161.21:9999/HelloFlex/HelloFlex.swf cannot load data from http://localhost:9999/HelloFlex/messagebroker/amf. url: 'http://localhost:9999/HelloFlex/messagebroker/amf'"]

455 views
Skip to first unread message

ZEUSS

unread,
Mar 4, 2009, 1:36:12 PM3/4/09
to Flex India Community
Hello Guys,

I am developing a simple Flex app by using remote Object to access a
simple JAVA POJO object.
I am using BLAZEDS and Tomcat 5.5.26.I have deployed an application
whose context-root is HelloFlex on port 9999 on my machine.

Everything runs fine if I use the URL:http://localhost:9999/HelloFlex/
HelloFlex.html.
But as soon as try to run the app using : http://203.72.161.21:9999/HelloFlex/HelloFlex.html
where i am using my ipaddress in the URL to invoke the application or
127.0.0.1 i get the following error:

[RPC Fault faultString="Send failed"
faultCode="Client.Error.MessageSend"
faultDetail="Channel.Security.Error error Error #2048: Security
sandbox violation: http://203.72.161.21:9999/HelloFlex/HelloFlex.swf
cannot load data from http://localhost:9999/HelloFlex/messagebroker/amf.
url: 'http://localhost:9999/HelloFlex/messagebroker/amf'"]
at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/
internal::faultHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src
\mx\rpc\AbstractInvoker.as:220]
at mx.rpc::Responder/fault()[C:\autobuild\3.2.0\frameworks\projects
\rpc\src\mx\rpc\Responder.as:53]
at mx.rpc::AsyncRequest/fault()[C:\autobuild\3.2.0\frameworks\projects
\rpc\src\mx\rpc\AsyncRequest.as:103]
at mx.messaging::ChannelSet/faultPendingSends()[C:\autobuild
\3.2.0\frameworks\projects\rpc\src\mx\messaging\ChannelSet.as:1482]
at mx.messaging::ChannelSet/channelFaultHandler()[C:\autobuild
\3.2.0\frameworks\projects\rpc\src\mx\messaging\ChannelSet.as:975]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.messaging::Channel/connectFailed()[C:\autobuild\3.2.0\frameworks
\projects\rpc\src\mx\messaging\Channel.as:997]
at mx.messaging.channels::PollingChannel/connectFailed()[C:\autobuild
\3.2.0\frameworks\projects\rpc\src\mx\messaging\channels
\PollingChannel.as:354]
at mx.messaging.channels::NetConnectionChannel/defaultErrorHandler()
[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\messaging\channels
\NetConnectionChannel.as:409]
at mx.messaging.channels::NetConnectionChannel/securityErrorHandler()
[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\messaging\channels
\NetConnectionChannel.as:367]


I have been going through the group for this error,I have also
included the crossdomain.xml and also loaded the same through
initialize in HelloFlex.mxml method as follows:

private function initDomain(): void
{
var ip:String = "203.72.161.21";
Alert.show("in init().....");
//Security.allowDomain("*");
Security.allowDomain(ip+"/HelloFlex/");
Security.loadPolicyFile("http://"+ip+":9999/HelloFlex/
crossdomain.xml");
Alert.show("loaded
policyfile.....");
}

But the problem still persists.Please note that the issue is with
accessing the flex pages through using ipaddress instead of
localhost.The problem persists in all browsers namely IE7,FF3,CHROME
and SAFARI 4.

Please anyone can suggest any solution.

Awaiting Replies
Reply all
Reply to author
Forward
0 new messages