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