Select to view content in your preferred language

Map Service won't show up in FlexViewer

4902
22
05-27-2010 04:42 AM
PaulFrey
Emerging Contributor
So i have a published map service that is running fine, if I go to its actual URL in a browser it is there and it is running.  However when i link it into the FlexViewer it will not show up.  I have it programmed in as a Live Map and a basemap and neither of them show.  I'm really hoping someone else has had this problem and its an easy fix.  Does anyone have any clues as to what is going on?  Any help would be greatly appreciated.

-Paul
Tags (2)
0 Kudos
22 Replies
RobertScheitlin__GISP
MVP Emeritus
Daniel,

   No it is probably as simple as you did not update the initial extent property to match your datas spatial reference. No attachment by the way.
0 Kudos
DanielOchoa
Regular Contributor
I forgot to mention that I did update that intitial extent.  I got the intitial extent by looking at the service in the REST service manager list.

I'm attaching the file to this post.  Again, certain elements have been changed for security. All I'm trying to do is get one basemap to work. Nothing else.  Can't even get that far...
0 Kudos
DasaPaddock
Esri Regular Contributor
Can you use a tool like HttpFox to look for requests to your service and see what the responses are? Is your Viewer on the same web server as your ArcGIS Server?
0 Kudos
DanielOchoa
Regular Contributor
I will try using HttpFox.  In the meantime, I ran through this checklist:

1. I was able to use the Services Directory to make sure I had the right name, e.g.
http://localhost/ArcGIS/rest/services/

2. I opened the URL in a browser, and was able to read the metadata:
http://localhost/ArcGIS/rest/services/<folder>/MapServer

3. I can view the map with the JavaScript API link on that page:
http://localhost/ArcGIS/rest/services/<folder>/<map>/MapServer?f=jsapi

Everything is on one server. I'm even working on the viewer on the server.

Thanks,
0 Kudos
DanielOchoa
Regular Contributor
Here is a screencap from my httpfox attempt. Looks like it is looking for a crossdomain file.  I didnt know you had to have one;  I thought you only needed one if you were doing cross-server data exchanging.  I guess I'll try making one and throwing one in.
0 Kudos
DanielOchoa
Regular Contributor
ANSWER:

Ok, that did it.  I added a crosssdomain.xml file to the c:\inetpub\wwwroot folder with this in it:

<?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>

And all of a sudden it worked.  Again, since everything is on one server, I dont know why I would need it, but it works.

Thanks to everyone for the assistance!

~ d
0 Kudos
DasaPaddock
Esri Regular Contributor
You need a crossdomain.xml file if the domains in the urls are not identical.

Even if the Viewer url was http://127.0.0.1/... and the service url was http://localhost/... it would try to load a crossdomain.xml file.
0 Kudos
DanielOchoa
Regular Contributor
dpaddock,

Ok, I get that part.  But I see now that this only works on the server that its being built on. Across the network, same thing as before - no map.  So, I'm thinking something else has to be added to the crossdomain.xml, but I thought these two lines;

<site-control permitted-cross-domain-policies="all"/>
<allow-access-from domain="*"/>


...would pick up and allow requests from anywehere, no?

If not, can you tell me how this should look to allow access from anywhere?

Thanks!

~ D
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Daniel,

   Localhost or a loopback IP address is going to mean something else on a different machine so you need to be using the machine name instead and you need to verify the the machine name is being resolved on the network. So try something simple and enter the following url on a machine in the network that is not the host machine http://machineName/ArcGIS/rest/services and see if it resolves and displays the REST Service directory page.
0 Kudos
DanielOchoa
Regular Contributor
rscheitlin,

Tried that - its resolves not only to the machine name, but the alias and the IP as well. I can use any of those in front of "ArcGIS/rest/services" (i.e.  http://<any of the above works>/ArcGIS/rest/services )

Here is my crossdomain file:

<?xml version="1.0" ?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*" />
<site-control permitted-cross-domain-policies="all" />
<allow-http-request-headers-from domain="*" headers="*" />
</cross-domain-policy>


Thanks for the continued support....
0 Kudos