On 3/9/16, 3:13 AM, "santanu4ver" <[email protected]> wrote:
> >> Cross-Origin Request Blocked: The Same Origin Policy disallows reading >>the >> remote resource at >> http://www.gadhavitechnologies.com/project/Flex/testData.json. (Reason: >> CORS header 'Access-Control-Allow-Origin' missing). > >I replaced the remote source call by relative to project source call and >uploaded complete 'js-debug' to a remote location. I found accessing >HTTPService.json is working cross-browsers, cross-platforms. > >I therefore run same 'js-debug/index.html' which has relative source call >only as file:// URLs way. I found accessing HTTPService.json is again >failing to some of the browsers: > >- Accessible in: Safari, Firefox (OSX), Firefox (Windows) >- Not Accessible in: Chrome, IE (Windows) Check the console in the browser. Are you still getting a CORS failure? In the end, will you be deploying the client to the same server? If so, setting up a test server, even localhost, and using relative URLs is probably the best way to test, even for SWFs because it sets up the same security environment as the production server. > > >Since HTTPService call is still working partly to specific browsers, >uploading source to a remote location everytime to test may not be an >intuitive process. FlashBuilder (and I think other IDEs) will help you deploy the build to a server and use http:// instead of file:// >Also, how we determine if such Cross-origin request block >occur - does HTTPService.complete event reports that by some specific >property? AFAICT, there is no error, but status will be 0 instead of >=200. It won't tell you if some non-CORS reason caused status to be 0 though. -Alex
