Cannot Access Map Services - Silverlight

921
6
Jump to solution
02-25-2014 06:00 AM
RobHalko
New Contributor II
My problem is quite common - I have a Silverlight application on a web server, attempting to access map services on our GIS server.

I have IIS running on the GIS server, tested the app there, no problems of course. I developed the application my PC... when I debug as "localhost:53843", it also has no problem loading the data from GIS server.

When I added the application on the web server, identical to the GIS server (IIS 7, with correct MIME types), it cannot load the services (GUI loads nicely). Now, we do have the clientaccesspolicy.xml and crossdomain.xml setup. We know they work because we already have a Silverlight GIS application accessing services the same way that my new application wants to. But for some reason my application cannot connect through.

I believe the problem is with how I reference the services in xaml, or potentially that my application is not requesting clientaccesspolicy.xaml - it doesn't show up when I look in Fiddler. Is there some configuration I must do to have my custom application check for clientaccesspolicy.xaml?

Here is an example from xaml:
<esri:ArcGISTiledMapServiceLayer x:Name="<omitted>" ID="<omitted>" Visible="True"
          Url="http://<gis server name>/arcgis/rest/services/Map_Services/AjaxOnTheMap_Basemap/MapServer">
</esri:ArcGISTiledMapServiceLayer>

Any help is greatly appreciated.
Rob
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobHalko
New Contributor II
So... all I had to do was install the Web Adapter onto the web server and configure to work with our GIS server, ensuring it is of the same service pack as my ArcGIS Server install. Then update the references to map services through the web server uri. It is pretty simple, and obviously ESRI has done a great thing with the Server technology, the problem lies with how it wasn't apparent that I needed to do that, even after scouring over forums and help system (finally I did find it in the help). I've been formally trained in an expensive ESRI course on building web maps... this wasn't covered. I will request that the web adapter be covered by that course. All it would have taken was an additional slide and 5 minutes of lecture time.

See this page for help - http://resources.arcgis.com/en/help/main/10.1/index.html#/About_the_ArcGIS_Web_Adaptor/01540000028p0...

View solution in original post

0 Kudos
6 Replies
RobHalko
New Contributor II
I was able to find the problem via some generic Silverlight threads on REST services and clientaccesspolicy, etc.

Simple: in the code, change the machine reference to any service to the IP address instead of the server name.

Hopefully that helps anyone that has the same problem.
0 Kudos
RobHalko
New Contributor II
Sorry, this only fixed my problem to provide the services in my application to client's on my network (when they can still find that specific IP).

How am I supposed to expose the map services to external clients? Again, I hope it is just the way I'm referencing the map service (REST).

I get a 502 error now in Fiddler when it tries to access clientaccesspolicy.xml
0 Kudos
WilliamCraft
MVP Regular Contributor
Which 502 error is it?  Try turning off Friendly Errors in your browser to see if it might be 502.1 or 502.2.  What happens if you change all of your IP address references in your service properties to use the fully-qualified name (FQN) of your machine instead?
0 Kudos
RobHalko
New Contributor II
Thanks for your reply William.

I switched to FQN, connection still works locally, not outside of network. GIS server is not available outside of network. I was under the impression that the IIS server (upon which the application is running) should be able to find my gis server hosting the map services and make the request.

Fiddler seems to be showing that the client machine is trying to find the gis server, or in other words, IIS server is not making the request to gis server - client is making the request. So far I've chalked this up to a problem with how I've configured my application... but I can't find more info on it specifically.

Here is my tiledmap reference with fqn:

<esri:ArcGISTiledMapServiceLayer x:Name="AjaxOnTheMap_Landbase" ID="Landbase" Visible="True" Opacity=".9"
                    Url="http://toa-gis.oscarnt.net/arcgis/rest/services/Map_Services/AjaxOnTheMap_Landbase/MapServer">
            </esri:ArcGISTiledMapServiceLayer>

Do I need to create a virtual directory on the IIS machine to reference the REST services?
0 Kudos
RobHalko
New Contributor II
Also, I don't know how to get 502.1 or .2 distinction. I changed the setting for Friendly Errors. I'm using Fiddler, it says "DNS Lookup Failed" when using FGN for server, and just "Connection Failed" when using IP address for server.
0 Kudos
RobHalko
New Contributor II
So... all I had to do was install the Web Adapter onto the web server and configure to work with our GIS server, ensuring it is of the same service pack as my ArcGIS Server install. Then update the references to map services through the web server uri. It is pretty simple, and obviously ESRI has done a great thing with the Server technology, the problem lies with how it wasn't apparent that I needed to do that, even after scouring over forums and help system (finally I did find it in the help). I've been formally trained in an expensive ESRI course on building web maps... this wasn't covered. I will request that the web adapter be covered by that course. All it would have taken was an additional slide and 5 minutes of lecture time.

See this page for help - http://resources.arcgis.com/en/help/main/10.1/index.html#/About_the_ArcGIS_Web_Adaptor/01540000028p0...
0 Kudos