In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
What is the solution to the sandbox problem of Flex cross-domain access? many novices are not very clear about this. In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can get something.
When Flex accesses the WebService service, it can be accessed normally locally. When it is deployed to a web container and published as a web service, and then WebServicIE is called, access will be denied. This is the sandbox problem of Flex cross-domain access. The solution is described below.
Sandbox problem of Flex Cross-domain access
When Flex accesses the WebService service, it can be accessed normally locally. When it is deployed to a web container and published as a web service, and then WebServicIE is called, access will be denied. This is the sandbox problem of Flex cross-domain access. To solve the problem of Flex cross-domain access to WebService, you can use the following solution:
First of all, Flex cross-domain access is denied because the service provider does not configure a security policy file, that is, crossdomain.xml, if you do not want to use crossdomain.xml, you need to use a proxy, that is, you write a background read webservice, and then provide it to your own flex application, because in flashplayer, Flex cross-domain must have a policy file. Considering that the security has been enhanced after the upgrade of flashplayer to 9.124, the previous crossdomain.xml has been written differently. Here is the complete way to write the file:
Indicates that the service allows access from any external domain.
With regard to the placement directory of crossdomain.xml, there are the following solutions, which can be placed in:
1) if this directory is the root of the container, you can access crossdomain.xml through the following url:
Http://localhost:8080/crossdomain.xml .
2) if crossdomain.xml is not placed in the root directory, but under a certain webapp, it needs to be applied at initialization time in flex.
Security.loadPolicyFile ("http://localhost:8080/xx/crossdomain.xml");"
Where xx is the name of webapp
In this way, when an external Flex accesses the WebService published by the service across domains, the flashplayer first looks for the crossdomain.xml file. If the security mechanism is set to allow access, the access is successful.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.