Solved

Proxy problem with ArcGis

  • 10 March 2021
  • 3 replies
  • 286 views

Userlevel 5
Badge +22

Once selecting a GIS object and trying to connect it to an IFS object, the hereunder message fires. Seems my proxy definition is wrong, but I’m a bit lost amongst the different possibilities offered by documentation and what the integration tries to do in such a case as no IFS object is selected at that moment. Why choosing an option and not another ?

My actual proxy is :       <serverUrl url="http://services.arcgisonline.com/ArcGIS/rest/services"
                 matchAll="true"/>

 

 

icon

Best answer by Mathias Dahl 12 March 2021, 13:14

View original

This topic has been closed for comments

3 replies

Userlevel 7
Badge +30

Hi, you need to at least add the URL mentioned in the error to your proxy config:

htps://services8.arcgis.com

So, something like this:

<serverUrl url="htps://services8.arcgis.com"

                 matchAll="true"/>

Or, include more of the URL to have the proxy support a narrower scope:

<serverUrl url="htps://services8.arcgis.com/that long random string I don't want to type/arcgis/rest/services"

                 matchAll="true"/>

If it’s just for a demo you can probably use the shorter version. For a proper production installation, you should not have too general (short) URLs in the proxy I think.

To make things easier for the demo you can also make your map service/layer public. Then the authentication will be simpler and you need to mess less with the proxy config.

 

Userlevel 5
Badge +22

Hi Mathias, Doesn’t seem to work either. Maybe it is because my basemap comes from http://server.arcgisonline.com/ArcGIS/rest/services while my GIS maps are coming from another url. Would you be available offline to get full explaination of the logic here ?

 

 

Userlevel 7
Badge +30

You could try adding that base URL as well. When it comes to basemaps the proxy is not used much, but I think it might be used when the map loads, to get the metadata for it.

As for understanding how it all works, the documentation should explain it. This is the main document:

http://docweb.corpnet.ifsworld.com/ifsdoc/Apps10/documentation/en/ObjectPositioningGISMap/AboutGISConcepts.htm?StandAlone=true

Search for “Configuring the GIS proxy” on that page to see how the proxy can be configured.

When you install IFS, the proxy contains a quite good setup so that the standard basemaps should work well, and it also contains some examples that you can tweak. It seems this has been messed up in your installation. Here is the default proxy configuration:

<?xml version="1.0" encoding="utf-8" ?>

<ProxyConfig allowedReferers="*"

             logFile="proxy_log.log"

             mustMatch="true">

  <serverUrls>

    <!-- For basemaps on ArcGIS Online to work -->

        

    <serverUrl url="https://services.arcgisonline.com/ArcGIS/rest/services"

               matchAll="true"/>

    <serverUrl url="http://services.arcgisonline.com/ArcGIS/rest/services"

               matchAll="true"/>

    <serverUrl url="https://server.arcgisonline.com/ArcGIS/rest/services"

               matchAll="true"/>

    <serverUrl url="http://server.arcgisonline.com/ArcGIS/rest/services"

               matchAll="true"/>

    <!-- The following URL is useful to have when the user opens a

         secure layer and where the proxy has no user name and

         password for it. In that scenario, the user will be prompted

         for username and password in the map, and that will in turn

         be passed to the proxy which will generate a token using the

         URL below. Similarly, if using an internal ArcGIS server with

         secure layers, the URL to that token generator must be added

         in this file as well. Modify the INTERNALSERVER example below. -->

    <!-- Allow generating tokens on ArcGIS Online. See explanation above. -->

    <serverUrl url="https://www.arcgis.com/sharing/generateToken"

               matchAll="true"/>

    <!-- To allow a certain service with the name MYCLOSEDSERVICEID on ArcGIS Online 

         The username and password are used to generate a short-lived token used to 

         login the user automatically. -->

    <serverUrl url="https://services.arcgis.com/MYCLOSEDSERVICEID/ArcGIS/rest/services"

               matchAll="true"

               username="myusername"

               password="mypassword"/>

    <!-- To allow generating tokens on an internal server. See explanation above. -->

    <serverUrl url="http://INTERNALSERVER:6080/arcgis/tokens/generateToken"

               matchAll="true"/>

    <!-- To allow a certain service with the name SERVICENAME on an internal server

         The username and password are used to generate a short-lived token used to 

         login the user automatically. -->

    <serverUrl url="https://INTERNALSERVER:6080/ArcGIS/rest/services/SERVICENAME"

               matchAll="true"

               username="myusername"

               password="mypassword"/>


  </serverUrls>

</ProxyConfig>

<!-- See https://github.com/Esri/resource-proxy for more information -->

 

Perhaps you should restart fresh with the above and add your URLs on top of it?