Flex Basic Authentication and Sandbox violation

13 views
Skip to first unread message

marco....@gmail.com

unread,
Jun 19, 2008, 12:02:09 PM6/19/08
to AS3 HttpClient
Hi
I'm delevoping a webapp using Flex as frontend and a webapp using
Spring.

The webapp uses the basic authentication system. I extended your lib
in order to provide basic authentication feature to the Flex
application.

When I run the application inside the Flex Builder, or opening the
wrapper html it works. If I deploy my application in an application
server, it provides me this error.

Error #2044: Unhandled securityError:. text=Error #2048: Security
sandbox violation: http://localhost/flex/main.swf cannot load data
from localhost:80.

The webapp is deployed on a tomcat at port 8080. There is an Apache
Server that works as a proxy on port 80. On the Apache Server I
defined the crossdomain.xml file that allows all domain.

Do you have any suggestion to solve this problem??

Thanks in advance.
-- Marco

gabe

unread,
Jun 19, 2008, 1:05:02 PM6/19/08
to AS3 HttpClient
Yeah, my brain just recently exploded investigating this topic... :
( The problem is in order to use flash.net.Socket (which is how this
HTTP client is implemented), you need to have a flash socket policy
server. (While in the sandbox of the Flash runtime; AIR does not have
this restriction.) I think that this restriction is for 9.0.125 and
above... but I'm not sure.

I would check out:
http://www.adobe.com/devnet/flashplayer/articles/socket_policy_files.html

To debug I would use a standalone flash debug player with logging
configured and you will see it attempt to connect to flash socket
policy server at port 843.

I think it all stems from paranoia (probably justified) about using
sockets from a plugin in a browser. Its hard though when security
models totally cripple an API :(

On Jun 19, 12:02 pm, "marco.pleb...@gmail.com"
<marco.pleb...@gmail.com> wrote:
> Hi
> I'm delevoping a webapp using Flex as frontend and a webapp using
> Spring.
>
> The webapp uses the basic authentication system. I extended your lib
> in order to provide basic authentication feature to the Flex
> application.
>
> When I run the application inside the Flex Builder, or opening the
> wrapper html it works. If I deploy my application in an application
> server, it provides me this error.
>
> Error #2044: Unhandled securityError:. text=Error #2048: Security
> sandbox violation:http://localhost/flex/main.swfcannot load data
Reply all
Reply to author
Forward
0 new messages