2 Replies Latest reply on Sep 7, 2015 8:46 AM by Wingnow

    Why a simple URLRequest also need crossdomain.xml?

    Wingnow Level 1

      Hi, I tried to call a HTTP request to get a pure text / html / xml / json from a site, but Flash Player return a #2044 error.


      For example:


        var request:URLRequest = new URLRequest("http://www.yahoo.com");

        request.method = URLRequestMethod.GET;

        request.contentType = "text/plain";

        new URLLoader().load(request);


      Would return warning on Policy File:

           Warning: [strict] Policy file requested from http://www.yahoo.com/crossdomain.xml redirected to https://www.yahoo.com/crossdomain.xml; will use final URL in determining scope.


           Warning: Domain www.yahoo.com does not specify a meta-policy.  Applying default meta-policy 'master-only'.  This configuration is deprecated.  See http://www.adobe.com/go/strict_policy_files to fix this problem.


           *** Security Sandbox Violation ***

           Connection to http://www.yahoo.com halted - not permitted from file:///C:/XXX/Test/bin-debug/Test.swf

           Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: file:///C:/XXX/Test/bin-debug/Test.swf cannot load data from http://www.yahoo.com.

             at Test()[C:\XXX\Test\src\Test.as:18]



      I don't understand, since it is just a simple HTTP request and it works fine before. But now it require crossdomain.xml...

      Please help.


      Environment: Windows 7, Chrome Browser, Flash Player Version: (Debug)