Is there a way to reset the "services directory" to the default settings

680
3
05-05-2022 11:29 AM
JeffJacobson
Occasional Contributor III

On my agency's ArcGIS Server, when you go to an individual map service's page, some of the "View in..." links at the top of these pages don't work correctly. The URLs are all http rather than https, and the JavaScript API links are currently configured to point to the old 3.X version of the API which is no longer supported and thus when the user clicks on the link the page they're taken to doesn't work.

I found the documentation about how to EDIT these settings, but I was wondering if there was a way to "reset to Esri recommended defaults" rather than editing individual settings one-by-one.

0 Kudos
3 Replies
Scott_Tansley
MVP Regular Contributor

It looks to me like you're on the defaults.  Can I ask you to navigate to:

https://[yourdomain]/admin/security/config ?

At the top it will say Protocol, and I'm assuming it currently says "http and https" .  Ideally that wants to be "HTTPS Only".  Be aware that changing that can have wider impacts on your configurations, so you need to be 100% sure that you're not using HTTP anywhere.

Looking at your site, if you ask to view something in the "JavaScript Viewer":

ArcGIS API for Javascript: AirportMapApplication/AirportFacilities (wa.gov)

then that is the 4.x libraries.  If you ask for the same in your AGOL viewer, then yes it's v3.x libraries:

https://wsdot.maps.arcgis.com/home/webmap/viewer.html?url=http%3A%2F%2Fdata.wsdot.wa.gov%2Farcgis%2F...

Your rest handlers are configured to the default to send you to the v3 map, you need to change those to point to the 'new' map viewer:

https://wsdot.maps.arcgis.com/apps/mapviewer/index.html?url=http%3A%2F%2Fdata.wsdot.wa.gov%2Farcgis%...

So in this part of the server API:

https://[yourdomain]/hosting/admin/system/handlers/rest/servicesdirectory

change the ArcGIS.com URL: from:

https://wsdot.maps.arcgis.com/home/webmap/viewer.htm

to:

https://wsdot.maps.arcgis.com/apps/mapviewer/index.html 

By forcing everything to HTTPS and this change you should end up with:

https://wsdot.maps.arcgis.com/apps/mapviewer/index.html?url=https%3A%2F%2Fdata.wsdot.wa.gov%2Farcgis... 

Scott Tansley
Consulting Architect (ArcGIS Enterprise)
https://www.linkedin.com/in/scotttansley/
JeffJacobson
Occasional Contributor III

Thanks, but what I was asking is if there was a simple "Reset to defaults" REST endpoint or button in Manager or something of that nature. (I already am aware of how to look up what the defaults were and change them.)

On our production ArcGIS Server, I can't make these changes myself and have to instruct someone else on what I want them to do. I was hoping there was a simple "reset" command I could point them to that I was not seeing in the documentation.

0 Kudos
Scott_Tansley
MVP Regular Contributor

I hear you, no, nothing like that, it's setting by setting.  The closest I've seen to what you're asking for would be exporting the site on Day 0, so that if anything goes wrong you can import that version of the site.  The problem is that on Day 1 you typically create services and change configuration and you want to retain those changes.  

Ultimately, it's a case of setting by setting.

Scott Tansley
Consulting Architect (ArcGIS Enterprise)
https://www.linkedin.com/in/scotttansley/
0 Kudos