If 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" />

4 Responses to “Calling secure (SSL) remote service from local Flex app running in Flexbuilder”

  1. sine

    July 19th, 2009 at 11:01 pm

    …this: ??

    Unfortunately I don’t see anything there…

    Reply
  2. 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

    Reply
  3. DannyT

    July 25th, 2009 at 12:42 pm

    sorry changed my code embed plugin and it hid it, should be visible now.

    Reply
  4. 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.

    Reply

Leave a Reply

About DannyT

The blog: danny-t.co.uk - General geek talk focusing on Rich Internet Applications, Microsoft and Adobe technologies and the web in general. The business: Moov2.com - RIA development agency Dan Thomas has been an Internet geek since circa 1994. He has been running Moov2 since 2003 and prior to that worked as a Flash developer for one of europes largest E-learning providers.

Copyright © 2010 Danny-T.co.uk

CSS Template By RamblingSoul | WordPress Theme by Theme Lab and Best Hosting.