Calling secure (SSL) remote service from local Flex app running in Flexbuilder
Published on July 18th, 2009 by DannyT. Filed under FlexIf you have your remoting service running under SSL you might find when trying to use it from FlexBuilder you get an error along the lines of:
Channel.Security.Error error Error #2048:
Security sandbox violation: file://localhost/Users/Username/Flex/Projects/MyProject/bin-debug/MyProject.swf cannot load data from https://www.mywebsite.com/remoting/weborb.aspx. url: ‘https://www.mywebsite.com/remoting/weborb.aspx’”
Firstly make sure you have a cross domain file but I’m assuming you’ve already done that much, all you need to do is add the following to allow your locally running (non-secure) site to access the secure remote site by adding this:
1 | <allow-access-from domain="localhost" to-ports="*" secure="false" /> |

sine
July 19th, 2009 at 11:01 pm
…this: ??
Unfortunately I don’t see anything there…
Mark K
July 24th, 2009 at 7:37 pm
I don’t see anything there either. But I have a further question:
I have this exact 2048 problem, but it occurs when I try to go to WebOrb console pages. So in this case I’m not even using my Flex code. The error I get is:
Details :faultCode:Client.Error.MessageSend faultString:’Send failed’ faultDetail:’Channel.Security.Error error Error #2048: Security sandbox violation: http://localhost/weborb30/console/console.swf cannot load data from https://localhost/weborb30/console/weborb.aspx.
As far as I know, I have never set up any kind of https server. I’m just runing IIS as it came.
Mark
DannyT
July 25th, 2009 at 12:42 pm
sorry changed my code embed plugin and it hid it, should be visible now.
Mark K
October 1st, 2009 at 7:41 pm
Instead of using localhost, I replaced it with ‘127.0.0.1′ and the problem went away. No idea why.