Open topic with navigation
Deploying your application
For improved performance, adjust your Flex Builder settings as follows:
When you compile your application in Adobe Flex Builder 3, a debug version is created. While useful for development purposes, this is not optimal for deployments.
When you are ready to deploy your application, use Adobe's Flex Export Release Build process to create an optimized release-quality version of your SWF file:
The compiled application (SWF file), its HTML wrapper, and its related files (e.g., shared libraries) can be moved onto any Web server. There are no dependencies on any additional files hosted by you, or ESRI, at runtime because the compiled SWF contains all the necessary code.
When a Web user accesses the HTML wrapper file, the browser will verify that Adobe Flash Player is installed and using the specified minimum Flash Player version. The client browser will then download the SWF file. After this point, the user might not connect back to this Web server at all but rather directly to the servers containing map content and tasks. Note that if your web application is not hosted on the same server as the ArcGIS Server, you will have to have a crossdomain.xml on the ArcGIS Server.
To access data from a different server than the one hosting your Flex application, the remote server needs to have a cross-domain file in the root directory. For security reasons, the Web browser cannot access data that resides outside the exact Web domain where the SWF file originated. However, Adobe Flash Player can load data across domains if permission is granted from the server. This is accomplished by including a small crossdomain.xml file on the remote server that permits Flash to connect to services on that server. For instance:
<?xml version="1.0"?> <!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd"> <cross-domain-policy> <site-control permitted-cross-domain-policies="all"/> <allow-access-from domain="*"/> </cross-domain-policy>
For additional information, read Using cross-domain policy files in the Adobe Flex 3 Help, see the Adobe TechNote "External data not accessible outside a Macromedia Flash movie's domain," or view a sample cross-domain file.
To deploy the cross-domain file on ArcGIS Server, see the instructions specific to your platform.