1 Reply Latest reply on Dec 28, 2009 10:25 PM by Madhav Subedi

    Flex Security SandBox Issue ----- Error #2148

    scott.cheng

      Scene: 
      Develop codes in Flex Builder,deploy in Tomcat,Flex Web application(not AIR).

      Object:
      Read the content of local file.
      Since Flex web application can not use the File class which is for AIR application,and the FileReference class can't get the file content,so I use JavaScript to get the path of local file via a <input type="file"/>, then create a URLRequest with the path, and get the file content by URLLoader.data.


      Issue:
      In FB IDE, everything runs well.
      But when I deploy it to tomcat, and access the application in IE with url http://localhost:8080/Test/bin-debug/Test.html , then error raised as below:

       

      SecurityError: Error #2148: SWF file http://localhost:8080/Test/bin-debug/Test.swf cannot access local resource file:///C:\Documents and Settings\administrator\Desktop\1.xml. Only local-with-filesystem and trusted local SWF files may access local resources.

       

      In this case, what should I do to solve this security issue? Does crossdomain.xml still make sense here? I don't know.

      Please help me, many appreciation.