Select to view content in your preferred language

Pushing my map Flex to the web

1704
11
Jump to solution
02-21-2014 11:19 AM
HectorChapa
Frequent Contributor
I just finish my map using flex api. I wanted to see what are the steps to push out online. I was able to do it once then after that I can't see the my map appear the rest files that lead to the map are not appearing in my map. I added the crossdomain.xml nothing seems to work any ideas or any list that I can follow to check if I did the steps to accomplishing my goal.
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Hector,

   Your issue is that Flex will always look for the crossdomain,xml file at the root of the urls that are used in your app so if your app is using http://gis.lrgvdc911.org:8399/arcgis/rest/services/someservice/..., and http://192.168.0.11:6080/arcgis/rest/services/someservice/... then using the root of both of those urls it will want to find a crossdomain.xml file. So you need to change the urls you are using in your app to urls that are publicly accessible.  Here is an example from your second test app you posted:

SecurityError: Error #2048: Security sandbox violation: http://67.78.127.3:9090/test3/STEAR.swf cannot load data from http://gissvr:6080/arcgis/rest/services/STEARWEBMAPTEST/FeatureServer/0
in that app you are using a url of http://gissvr:6080/arcgis/rest/services/STEARWEBMAPTEST/FeatureServer/0 which is not a public url and thus when the app that is publicly accessible tries to access this map service it see that it is coming from a different domain and thus needs a crossdomain.xml so it attempts to get one from http://gissvr:6080 and can not as that url is not public. Do you now understand that the urls to map or feature services have to be urls that are publicly accessible, if the app is going to be publicly accessible.

If you can not understand these concept or you can just not get them to work in your setup then you will want to look into using a proxy page and setting the proxyurl on all the map services you use.

https://developers.arcgis.com/flex/guide/using-the-proxy-page.htm

View solution in original post

0 Kudos
11 Replies
RobertScheitlin__GISP
MVP Emeritus
0 Kudos
HectorChapa
Frequent Contributor
I follow what it said and nothing is working I can see the map I only see buttons but no map. I don't know what I am doing wrong I was able to see it once and after that nothing wants to appear.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Hector,

   You need to use some for to http traffic tool to see what the issue is (if using Google Chrome then use Crome developer tools). I use Fiddler myself.
0 Kudos
HectorChapa
Frequent Contributor
I download fiddler I don't know how to use it. but I am going to give it a try.
0 Kudos
HectorChapa
Frequent Contributor
This is what happen see the attach picture. Could you analyze using fiddler. here is the ip so you could see for yourself what is the
problem

http://67.78.127.3:9090/flexparameters2.html
http://67.78.127.3:9090/test3/stear.html

could you check does two out let me know what is the problem I really need your help.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Hector,

   The problem is simple if you look in Fiddler there are three lines that are in RED (which is bad) the main two to worry about is the http://gis.lrgvdc911.org:8399/crossdomain.xml, and http://192.168.0.11:6080/crossdomain.xml
Your app is using a map service from http://gis.lrgvdc911.org:8399 thus Flex wants to find a crossdomain.xml file on that server. Either it is not there or it is not accessible using that url. Get this fixed and you are good to go. If these urls are not the urls that are publicly accessible then you need to use the publicly accessible urls in your Flex app to the map services instead of the internal ones that way Flex will look for the publicly accessible crossdomain.xml as well.
0 Kudos
HectorChapa
Frequent Contributor
Where would I find does files. Would they be located in the webserver or in the arc gis manager.
In the gis.lrgvdc911.org:8399/crossdomain.xml. Do I open that port. I know that the file is located some where else in another server. The 192.168.0.11:6080/crossdomain.xml is in the same place as the iis web server.
0 Kudos
HectorChapa
Frequent Contributor
If you input this in the browser you could see the xml like this http://gis.lrgvdc911.org/crossdomain.xml with out the port. I am guessing I have to  open that port in order to see it.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Hector,

   Your issue is that Flex will always look for the crossdomain,xml file at the root of the urls that are used in your app so if your app is using http://gis.lrgvdc911.org:8399/arcgis/rest/services/someservice/..., and http://192.168.0.11:6080/arcgis/rest/services/someservice/... then using the root of both of those urls it will want to find a crossdomain.xml file. So you need to change the urls you are using in your app to urls that are publicly accessible.  Here is an example from your second test app you posted:

SecurityError: Error #2048: Security sandbox violation: http://67.78.127.3:9090/test3/STEAR.swf cannot load data from http://gissvr:6080/arcgis/rest/services/STEARWEBMAPTEST/FeatureServer/0
in that app you are using a url of http://gissvr:6080/arcgis/rest/services/STEARWEBMAPTEST/FeatureServer/0 which is not a public url and thus when the app that is publicly accessible tries to access this map service it see that it is coming from a different domain and thus needs a crossdomain.xml so it attempts to get one from http://gissvr:6080 and can not as that url is not public. Do you now understand that the urls to map or feature services have to be urls that are publicly accessible, if the app is going to be publicly accessible.

If you can not understand these concept or you can just not get them to work in your setup then you will want to look into using a proxy page and setting the proxyurl on all the map services you use.

https://developers.arcgis.com/flex/guide/using-the-proxy-page.htm
0 Kudos