4 Replies Latest reply on Apr 23, 2008 12:17 PM by -windowns-

    WebServices: Policy File Issues

    -windowns- Level 1
      I've recently downloaded Flex 3 Beta 2 and started to monkey around with Flex. I was able to successfully communicate with a webservice on a separate box on my network. I got around the whole crossdomain issue, and things worked great.

      But then we updated the webservice to run on port 8000. And now i get this message:

      Warning: Failed to load policy file from http://testSvr:8000/crossdomain.xml

      The things is, the webservice is not being hosted by IIS, but is being hosted by a separate service that we have running. The web service is using WCF.

      Since we are not hosting with IIS, there is no way we can put the xml document at that location. So i placed it in the root of that server. Which places it at: http://testSvr/crossdomain.xml. Then i added a piece of code in the "preinitialize" event of the application to load the policy file at the new location.

      Security.loadPolicyFile(" http://testSvc/crossdomain.xml");

      I note in my console window that the file loads fine from that location. But apparently when it processes the webservice object that i have defined in mxml, it tries to find the policy file at http://testSvc:8000/crossdomain.xml.

      So what i want to do is to get the webservice object to only load the one i want, and to not try to find the crossdomain.xml file at the default location.