REST with Silverlight not displaying data changes

767
10
05-01-2010 04:58 AM
AnilDhiman
New Contributor
Hi,
     I have a geodatabase published as rest service through arcserver. After publshing the service, if I do some editing in layers through ArcMap, I do not see the changes made in the base data on silverlight map. I tried to restart the service but no luck. But when I create a new service with the same data, I could easily see the changes.

Also, When I try to do some rest query for newly generated objectIDs, I easily get those freshly created geometry objects.
1) Just wanted to know, Does REST support this behaviour or am i missing something?
2) Also, What if I want to get related tables results in through REST query.
0 Kudos
10 Replies
DominiqueBroux
Esri Frequent Contributor
Might be a browser's cache issue.
Try setting the 'DisableClientCaching' property to true. This adds a timestamp parameter to the request.

/Dominique
0 Kudos
AnilDhiman
New Contributor
I don't see any changes in my base layer,, which is updated from my real time source. Does REST doesn't show any changes made in base map after publshing the data.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
Is your base layer a DynamicMapServiceLayer, a TiledMapServiceLayer, a FeatureLayer ?

If your base layer is TiledMapServiceLayer, it means that the tiles are stored on the server and have to be updated after changing the data.

/Dominique
0 Kudos
AnilDhiman
New Contributor
Base layer is a AGSDynamiclayer but changes in this layer still doesn't reflect on silverlight viewer even if I restart the service. On the other hand, querying this layer shows me the changed records or geometries.
0 Kudos
EricPaitz
Esri Contributor
We had a similar problem with the ArcGIS Flex API. We had to add disableClientCaching to the ArcGISDynamicMapServiceLayer Tag. Then we also had to make sure to clear the local browser client cache and restart the browser.
0 Kudos
AnilDhiman
New Contributor
But if, you want to display a GPS point feature layer being contnously updated from a source. What should be done? can all this be done programmatically?
0 Kudos
dotMorten_esri
Esri Notable Contributor
if you disable client caching, you don't need to clear the client cache or restart the browser.
0 Kudos
AnilDhiman
New Contributor
I have published few ArcSDE layers as "Map Service" and trying to visualize it on silverlight App. Normally, when I do some querytask operation, it gives the results as expected. But, if the base layer is changed by source (like GPS), my querytask doesn't work for newly added features. I tried "query Layer" option in REST admin, but no luck. I tried refreshing the Cache but it is still not visible. Is there anything which I am missing?
is "Map service" is the correct type? or I need to create some Geodata kind of service?
Please suggest
0 Kudos
MikkelHylden
Occasional Contributor
This was driving me nuts for a while too - for me the query would work in Chrome and Firefox but not in IE.  The trick is that the queryTask needs to have disableclientCache set to true as well:

           QueryTask queryTask = new QueryTask(sitesLayerURL + "/" + sitesLayerIndex.ToString());
          queryTask.DisableClientCaching = true;
           queryTask.ExecuteCompleted += SitesQueryTask_ExecuteCompleted;
           queryTask.Failed += QueryTask_Failed;

Hope this helps...
0 Kudos