ArcGIS API for Flex 发布应用时 安全沙箱的问题
2013-01-24 10:03
621 查看
http://resources.arcgis.com/en/help/flex-api/concepts/index.html#/Deploying_an_application/017p00000019000000/
Deploying an application
Version 3.1Adobe Flash Builder setup
For improved performance, adjust your Adobe Flash Buildersettings as follows:Click Project
> Properties > Flex Compiler,then uncheck the
Enable integration with browser navigation checkbox. Unless you've added code to specifically support
deep links, there is no need for this box tobe checked.
Compiling an optimized SWF file
When you compile an application in Adobe Flash Builder, adebug version is created. While useful for development purposes,this is not optimal for deployments.When you're ready to deploy an application, use the Adobe Flash Builder
Export Release Build process to create anoptimized release-quality version of the SWF file as follows:
In Adobe Flash Builder, click
Project > Export Release Build from the main menu.
Click Finish.
Production workflow
The compiled application (SWF file), its HTML wrapper, and itsrelated files (for example, shared libraries) can be moved onto any webserver. There are no dependencies on any additional files hosted byyou (orEsri) at run time, because the compiled SWF file contains all thenecessary code.
When a web user accesses the HTML wrapper file, the browser verifies that Adobe Flash Player is installed and is using the specified minimum Flash Player version. The client browser then downloads the SWF file.
At this point, the user might not connect back to this web server at all but instead connect directly to the servers containing map content and tasks. If your web application is not hosted on the same server as ArcGIS Server, you must have a crossdomain.xml
file on ArcGIS Server.
About crossdomain.xml
To access data from a server other than the one hosting yourFlex application, the remote server needs to have a cross-domainfile in the root directory. For security reasons, the web browsercannot access datathat resides outside the exact web domain wherethe SWF file originated. However, Adobe Flash Player can load dataacross domains if permission is granted from the server. This isaccomplished by including a small crossdomain.xml file on theremote server that
permits Flash to connect to services on thatserver. See the following code example:
<?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, see
Using cross-domain policy files in the Adobe Flex 3 Help, Adobe TechNote "External data not accessible outside a Macromedia Flash movie's domain," or viewa
sample cross-domain file.
Deploying crossdomain.xml
To deploy the cross-domain file on ArcGIS Server, see theinstructions below specific to your platform and version. Note the crossdomain file goes on the server with ArcGIS Server, not the server with your application.For 10.1, the location is C:\Program Files\ArcGIS\Server\framework\runtime\tomcat\contexts\rootapp. Note that 10.1 comes with crossdomain.xml already installed, so unless you want to make changes, it should work
successfully.
.NET—Add crossdomain.xml to your web server's root directory, for example,C:\inetpub\wwwroot.
Java—Add crossdomain.xml to<ArcGIS_Server_Install_Location>\ArcGIS\java\manager\web_outputfor 10.0 or<ArcGIS_Server_Install_Location>\ArcGIS\java\web_output for9.3 installations of ArcGIS Server. On Windows, the
defaultlocations for these directories are as follows:
10.0—C:\ProgramFiles\ArcGIS\Server\java\manager\web_output
9.3—C:\Program Files\ArcGIS\java\web_output
To deploy the cross-domain file on ArcGIS Spatial Data Server, see the following instructions specific to your platform and version:
ArcGIS 10.1 Spatial Data Server for the Java Platform installs
the client access policy files in the Java installation directory (for example, C:\Program Files\ArcGIS\SDS10.1\java). Copy the crossdomain.xml file to your web server's root directory. For example:
If you use Apache Tomcat, place the appropriate client access policy file in $CATALINA_HOME/webapps/ROOT (Linux) or %CATALINA_HOME%\webapps\ROOT (Windows) prior to deploying.
If you use IBM WebSphere or Oracle WebLogic, create a .war file that contains the appropriate client access policy file and deploy it to the web server's root directory.
For
ArcGIS 10.1 Spatial Data Server for IIS, install the ‘Cross-domain Policy Files’ when you run the installation wizard. This installs the crossdomain.xml file in the web server root location.
相关文章推荐
- ArcGIS Server API For Flex 安全沙箱问题
- ArcGIS Server API For Flex 安全沙箱问题
- arcgis for java flex 安全沙箱问题
- ArcGIS server for .net 中应用API for flex 问题解决办法
- flex调用arcgis地图服务发布地图遇到安全沙箱问题
- arcgis flex 安全沙箱问题
- ArcGIS API For Flex对ImageServer发布的服务进行渲染及RasterFunction支持函数(学习笔记)
- ArcGIS Flex 安全沙箱问题
- arcgis flex 安全沙箱问题
- ArcGIS Server API For Flex 2.0 bata 版发布!!!
- arcgis api for flex之一、初学问题解决
- ArcGIS API for Flex and ArcGIS Viewer for Flex 2.2 发布
- ArcGIS API for flex遇到的问题解决(1)--地图服务url传值问题
- ArcGis For Flex安全沙箱
- ArcGIS API for Flex制作程序发布后出现错误:"访问 URL 时遇到安全性错误" 解决办法尝试(学习笔记)
- arcgis flex api 由于沙箱安全的原因 无法显示地图 的解决办法
- Arcgis javascript api离线地图开发环境搭建- dojo未定义- flex安全沙箱问题
- arcgis flex 安全沙箱问题
- ArcGIS API For Flex对ImageServer发布的服务进行渲染及RasterFunction支持函数(学习笔记)
- 关于Flex安全沙箱的问题