7 Replies Latest reply on Sep 25, 2008 6:00 AM by nijlz

    Crazy HTTPService Error

    nijlz
      I have a HTTPService that send user data via POST to authenticate. If I start the application from Flexbuilder (press run) erverything works fine. But if I export a release build and try to run the swf from bin-release, I get the following error message:
      faultCode:Channel.Security.Error faultString:'Security error accessing url' faultDetail:'Destination: DefaultHTTP'
      Can anybody tell me how to fix it?
      Thank you
        • 1. Re: Crazy HTTPService Error
          MotionMaker Level 1
          Does your URL have the same domain as the Http swf calls?
          • 2. Re: Crazy HTTPService Error
            ntsiii Level 3
            Yes, the "works in dev, but not in production" problem is almost always a security sandbox issue.

            As Lon indicates, a swf hosted in a normal browser instance can only access data sources from the *exact* same domain that served the swf. In development, Flex Builder hides this behavior and permits most any access.

            To access an asset on a different domain, that other domain must provide a crossdomain.xml file.

            If this is your issue, check the archives, Flex documentation and google for more information.

            Tracy

            • 3. Re: Crazy HTTPService Error
              nijlz Level 1
              I do not use the same domain for the swf and the http call, but I already have a crossdomain.xml. With <allow-access-from domain="*"/> inside.

              Nils
              • 4. Re: Crazy HTTPService Error
                theLoggerGuy
                The crossdomain policy is guaranteed to eat up your time. The latest version of the flash player made this even harder by requiring the port 843 for socket connections. Don't get me wrong it's all good security wise, but until it works it can be a pain. Try this is a crossdomain.xml file:

                <?xml version="1.0" ?>
                <cross-domain-policy>
                <!-- use this directive to open the cross domain policies to unrestricted access
                -->
                <site-control permitted-cross-domain-policies="all"/>
                </cross-domain-policy>

                Also have a read of this article: http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security.html. It's long, but worth it.
                • 5. Re: Crazy HTTPService Error
                  nijlz Level 1
                  Thanks this is a good hint. I hope I can fix it soon. I report whether this was the issue.
                  • 6. Re: Crazy HTTPService Error
                    nijlz Level 1
                    I changed the crossdomain.xml as you said, but it was getting worse. I can't reach the HTTP service and on top the WSDL cannot be loaded.

                    faultCode:Channel.Security.Error faultString:'Security error accessing url' faultDetail:'Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL ( http://www.....wsdl)'

                    But still everything works fine on the local machine with the bin-debug swf, but neither on the internet not the bin-release files work well.
                    Sorry I have no idea.
                    • 7. Re: Crazy HTTPService Error
                      nijlz Level 1
                      <cross-domain-policy>
                      <allow-access-from domain="*"/>
                      <site-control permitted-cross-domain-policies="all"/>
                      <allow-http-request-headers-from domain="*" headers="*"/>
                      </cross-domain-policy>