Select to view content in your preferred language

How do I clear legend after restarting services?

624
2
11-14-2011 03:21 PM
GregoryDillon
Occasional Contributor
I using the toolbox legend control in my app and today I had an issue where some of the layers in a particular service where broken due to a network error.    The caused the Legend to cache the layer in a broken state which resulted certain layers no showing.  


I restarted the service in ArcCatalog and even restarted the ArcGISServicesAppPool Application Pool in IIS but the Legend would not update.   I then tried to restart the Application Pool associated with the Map Application, but this still didn't work.   I then tried to go into the application and set DisableClientCaching to true on the problem DynamicService, but this still did fix.

Finally, I did an IISReset command.   This fixed the problem and caused the layer to appear again, but took out several other application I have running on this box (due to the IISReset).   This server is running  ArcGIS Server and Desktop 10 with Service Pack 1.   Is there anyway to clear the Legend control without doing an IISReset?
0 Kudos
2 Replies
DominiqueBroux
Esri Frequent Contributor
If it's a pure legend control issue, you can call the Refresh method of the legend control.

But likely, it's rather an issue with the metadata cache. In this case, you can clear the cache using this rest end point http://<yourserver>/ArcGIS/rest/admin/cache/clear
0 Kudos
GregoryDillon
Occasional Contributor
Thank you!   I believe the http://<yourserver>/ArcGIS/rest/admin/cache/clear method is what I was looking for.   I'll have to try it next time it happens.
0 Kudos