Select to view content in your preferred language

Dynamic Legends: Missing Images after Idle/Long Application Duration

1932
15
05-04-2010 07:31 AM
IrfanClemson
Frequent Contributor
Hi,
I have dynamic legends working fine for the most part, as per Robert's code from:
http://forums.esri.com/thread.asp?c=158&f=2421&t=299116&mc=137
However, I notice that if the user's session in the SFV application goes, say, over 20-30 minutes the images for the legends are not being returned by the server. Please see the attached screen cap. Using Service Capture I can see 404 errors pointing toward various .png files. I think these .png files are dynamically created by the ArcGIS Server's Map Service and their names change upon refreshing the browser (upon which the legends start working again -most- of the time).
I suspect there is some kind of 'flush' of data or some kind of 'recycling' of Services going on. May be something like:
http://forums.arcgis.com/threads/3177-Services-Fail-To-Load-in-SFV-Unless-Recently-Recycled-in-ArcGI...
Obviously, we can't have user's session limited to less than half hour or so and we can't expect them to refresh their browser window to get rid of the problem. I kind of remember our ArcGIS Server admin--who is also quite new to the management aspect of the server--telling me that he has some kind of 'flush' going on periodically. I will check with him but I want to get your input on this first.
Thanks!
Meengla
Tags (2)
0 Kudos
15 Replies
RobertScheitlin__GISP
MVP Emeritus
Rubio,

     Your fully qualified domain name is http://wlu-23-11.wlu.ca
You really want to get away from using local host or the IP address.

So ensure you are using http://wlu-23-11.wlu.ca/restLegend/restLegend.asmx?WSDL in your LivemapsWidget.mxml
0 Kudos
RuiboHan
Emerging Contributor
Rubio,

     Your fully qualified domain name is http://wlu-23-11.wlu.ca
You really want to get away from using local host or the IP address.

So ensure you are using http://wlu-23-11.wlu.ca/restLegend/restLegend.asmx?WSDL in your LivemapsWidget.mxml


Thanks a lot, Robert, a stupid question: how to get my qualified domain name?

I changed it to http://wlu-23-11.wlu.ca/restLegend/restLegend.asmx?WSDL, but the problem persists. Any ideas?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Rubio,

   Just google "ip reverse lookup".

So when you put http://wlu-23-11.wlu.ca/restLegend/restLegend.asmx in your web browser from the server and enter valid parameters what do the swatch urls look like?
0 Kudos
RuiboHan
Emerging Contributor
it is still http://wllbgis/arcgisoutput/_ags_legf664d458df954e10a952fbcbdf3b7991.png, anything I need to do on the server end?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Ruibo,

   Yep this is a common problem that has to be addressed in the WebService code. So that means you have to rebuild the webservice on your end using visual studio. The restLegend.vb file has a portion in it's code that needs to changed and uncommented.

''generates object for the specified MapServerLegendClass
    Private Function legendClass(ByVal lclass As MapServerLegendClass) As jcLegend
        Dim jcLeg As New jcLegend
        jcLeg.label = lclass.Label
        ''!--you may need the line below if you webserver return a image url that is not a 
        ''fully(qualified) url address--!
        jcLeg.url = Replace(lclass.SymbolImage.ImageURL, "wllbgis", "wlu-23-11.wlu.ca")
        ''jcLeg.url = lclass.SymbolImage.ImageURL
        Return jcLeg
    End Function
0 Kudos
RuiboHan
Emerging Contributor
Robert, you rock as always!!!!! Got everything work now!!

Actually, I saw that note you put in restLegend.vb, and also uncomment that with the server's ip, but didn't commnet out the following line...

Now it is running perpectly, even with the ip address, again, Robert, thank you so much, you can't imagine how much I appreciate your help.
0 Kudos