<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Odd Behavior - map service often doesn't load first attempt. in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/odd-behavior-map-service-often-doesn-t-load-first/m-p/662205#M14843</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I gave up on solving this ages ago! Thank you for posting a solution in a clear and concise manner. My users will no longer have to suffer.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Oct 2010 17:15:17 GMT</pubDate>
    <dc:creator>MatthewLawton</dc:creator>
    <dc:date>2010-10-19T17:15:17Z</dc:date>
    <item>
      <title>Odd Behavior - map service often doesn't load first attempt.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/odd-behavior-map-service-often-doesn-t-load-first/m-p/662200#M14838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Many staff complain about map doesn't show up at first attempt even though the interface show up fine. However it will show up fine when they refresh the page or close IE and reopen the web page.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This odd behavior happens inconsistently and I wonder if they is any ways to trouble shoot this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jul 2010 16:11:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/odd-behavior-map-service-often-doesn-t-load-first/m-p/662200#M14838</guid>
      <dc:creator>MikeJun</dc:creator>
      <dc:date>2010-07-22T16:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: Odd Behavior - map service often doesn't load first attempt.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/odd-behavior-map-service-often-doesn-t-load-first/m-p/662201#M14839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I seem to recall a thread in the old forum regarding sleeping map services:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.esri.com/Thread.asp?c=158&amp;amp;f=2421&amp;amp;t=264894&amp;amp;mc=26#msgid830021"&gt;http://forums.esri.com/Thread.asp?c=158&amp;amp;f=2421&amp;amp;t=264894&amp;amp;mc=26#msgid830021&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jul 2010 18:44:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/odd-behavior-map-service-often-doesn-t-load-first/m-p/662201#M14839</guid>
      <dc:creator>JamesKo</dc:creator>
      <dc:date>2010-07-22T18:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: Odd Behavior - map service often doesn't load first attempt.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/odd-behavior-map-service-often-doesn-t-load-first/m-p/662202#M14840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That is l the problem I had recently too.&amp;nbsp; The sleeping map services were the problem.&amp;nbsp; I ended up having to refresh the services every 15 minutes to keep the map displaying properly.&amp;nbsp; To save you the trouble of finding the script in the other forums:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'declare web app variable, set variable to be an IE application&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim webApp&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set webApp= CreateObject("InternetExplorer.Application")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'set visibility of the web app, can be set to false to run in the background&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;webApp.Visible = false&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'declare a counter variable as integer, set it to zero&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim counter&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;counter = 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'declare array to hold names of different services&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'simply increase the array by +1 and add a new entry for every new service that gets published&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'remember that the services array is 0 based.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;dim services(4)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;services(0)="Ortho/MapServer"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;services(1)="Basemap/MapServer"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;services(2)="Parcels/MapServer"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;services(x)="Other map services"/MapServer"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'the following loop uses the REST API and the array to step through each service page&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'wait 5 seconds, then navigate to the next service. The loop runs 5 times.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Do while counter &amp;lt; 5&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; For Each x in services&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; webApp.Navigate "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://" rel="nofollow" target="_blank"&gt;http://&lt;/A&gt;&lt;SPAN&gt;&amp;lt;server name&amp;gt;/ArcGIS/rest/services/"&amp;amp; x&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wscript.sleep(5000)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next'&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; counter = counter + 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Loop&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;webApp.quit&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set webApp = nothing&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Save to a .vbs file and add as a Scheduled Task.&amp;nbsp; Make sure you refresh at least every hour if not more frequently.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Keith&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jul 2010 18:53:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/odd-behavior-map-service-often-doesn-t-load-first/m-p/662202#M14840</guid>
      <dc:creator>KeithPalmer</dc:creator>
      <dc:date>2010-07-22T18:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: Odd Behavior - map service often doesn't load first attempt.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/odd-behavior-map-service-often-doesn-t-load-first/m-p/662203#M14841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Keith,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you so much for the solution. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Below is my modified vesion of yours. The only thing I change is service name and rest service path name. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I downloaded vbs definition syntax in textpad and put this code in and save as sleepmapservicecure.vbs. Since I don't have much vbs experience, I don't know there is any error in the code or not. When I double click on this vbs file, it seems like nothing happen.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However I do notice that there is apostrophe right behine NEXT command in your code. I wonder if this is right.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks so much.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;+++++++++++++++++++++++++++++&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim webApp&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set webApp= CreateObject("InternetExplorer.Application")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;webApp.Visible = false&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim counter&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;counter = 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;dim services(4)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;services(0)="Crime_Layer/MapServer"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;services(1)="Crime_Base/MapServer"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;services(2)="Ortho2009/MapServer"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do while counter &amp;lt; 5&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For Each x in services &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;webApp.Navigate "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://cobgisweb/ArcGIS/rest/services/" rel="nofollow" target="_blank"&gt;http://cobgisweb/ArcGIS/rest/services/&lt;/A&gt;&lt;SPAN&gt;"&amp;amp; x&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;wscript.sleep(5000)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Next'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;counter = counter + 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Loop&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;webApp.quit&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set webApp = nothing&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Aug 2010 21:36:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/odd-behavior-map-service-often-doesn-t-load-first/m-p/662203#M14841</guid>
      <dc:creator>MikeJun</dc:creator>
      <dc:date>2010-08-06T21:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: Odd Behavior - map service often doesn't load first attempt.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/odd-behavior-map-service-often-doesn-t-load-first/m-p/662204#M14842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Please disregard above reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I totally understood how it work when I switch to webapp.Visible = True.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;By the way, I took out apostrophe after NEXT.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;THANK YOU SO MUCH.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll set a schedule task now and see if it cures the sleeping service.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Aug 2010 21:57:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/odd-behavior-map-service-often-doesn-t-load-first/m-p/662204#M14842</guid>
      <dc:creator>MikeJun</dc:creator>
      <dc:date>2010-08-06T21:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: Odd Behavior - map service often doesn't load first attempt.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/odd-behavior-map-service-often-doesn-t-load-first/m-p/662205#M14843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I gave up on solving this ages ago! Thank you for posting a solution in a clear and concise manner. My users will no longer have to suffer.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Oct 2010 17:15:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/odd-behavior-map-service-often-doesn-t-load-first/m-p/662205#M14843</guid>
      <dc:creator>MatthewLawton</dc:creator>
      <dc:date>2010-10-19T17:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: Odd Behavior - map service often doesn't load first attempt.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/odd-behavior-map-service-often-doesn-t-load-first/m-p/662206#M14844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Fails at line 30 after first pass, any clue?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim webApp&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set webApp= CreateObject("InternetExplorer.Application")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;webApp.Visible = false&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim counter&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;counter = 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;dim services(16)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;services(0)="Daily/Annotation/MapServer"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;services(1)="Daily/Dynamic/MapServer"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;services(2)="Imagery/Orthos2009/MapServer"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;services(3)="Imagery/Orthos2007/MapServer"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;services(4)="Imagery/Orthos2005/MapServer"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;services(5)="Imagery/Orthos2000/MapServer"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;services(6)="Imagery/Orthos1997/MapServer"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;services(7)="Monthly/Municipal/MapServer"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;services(8)="Monthly/Physical/MapServer"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;services(9)="Monthly/PublicSafety/MapServer"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;services(10)="Monthly/TaxBase/MapServer"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;services(11)="Static/Natural/MapServer"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;services(12)="Static/ParcelSales/MapServer"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;services(13)="Static/StartUp/MapServer"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;services(14)="Static/Topography/MapServer"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;services(15)="Static/Natural/MapServer"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Do while counter &amp;lt; 17&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For Each x in services &lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;webApp.Navigate "http://gcgis/ArcGIS/rest/services/"&amp;amp;x&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;wscript.sleep(5000)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Next&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;counter = counter + 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Loop&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;webApp.quit&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Set webApp = nothing&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Oct 2010 11:54:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/odd-behavior-map-service-often-doesn-t-load-first/m-p/662206#M14844</guid>
      <dc:creator>PaulLang</dc:creator>
      <dc:date>2010-10-20T11:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: Odd Behavior - map service often doesn't load first attempt.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/odd-behavior-map-service-often-doesn-t-load-first/m-p/662207#M14845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I noticed you don't have a space between "&amp;amp;x". Not sure if that would cause the problem. Also, if you are running it on your actual web server then you can just use "localhost" as below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;webApp.Navigate "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://localhost/ArcGIS/rest/services/" rel="nofollow" target="_blank"&gt;http://localhost/ArcGIS/rest/services/&lt;/A&gt;&lt;SPAN&gt;"&amp;amp; x&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But I am not sure if this is really doing what it is supposed to. I am running this as a Scheduled Task every 20 minutes and I am still getting sleepy services. I may change this script to directly access my actual web applications instead of the services pages in REST.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Oct 2010 16:23:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/odd-behavior-map-service-often-doesn-t-load-first/m-p/662207#M14845</guid>
      <dc:creator>MatthewLawton</dc:creator>
      <dc:date>2010-10-21T16:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: Odd Behavior - map service often doesn't load first attempt.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/odd-behavior-map-service-often-doesn-t-load-first/m-p/662208#M14846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I tried it with and without spaces before posting.&amp;nbsp; Would not run on my server, but runs fine on my pc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I agree no change is map service display; it�??s about 50/50 for me.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Oct 2010 17:26:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/odd-behavior-map-service-often-doesn-t-load-first/m-p/662208#M14846</guid>
      <dc:creator>PaulLang</dc:creator>
      <dc:date>2010-10-22T17:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: Odd Behavior - map service often doesn't load first attempt.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/odd-behavior-map-service-often-doesn-t-load-first/m-p/662209#M14847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think I have developed a better method to "wake up" the sleepy map services. Here is a generic HTM page I have created utilizing the JavaScript API that will automatically run through all the available MapServer services that exist on the server in REST. It loads them into a single map on the page. I am going to set the VBS script to point to this page and open it up every 20 minutes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I understand that the "sleepy map service" issue is supposed to be solved in ArcGIS Server 10, but for those of us staying in 9.x a little longer, perhaps this will provide some relief.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
 &amp;lt;meta http-equiv="content-type" content="text/html; charset=utf-8"&amp;gt;
 &amp;lt;title&amp;gt;ArcGIS REST Map Services Keep Alive&amp;lt;/title&amp;gt;
 &amp;lt;link rel="stylesheet" href="https://community.esri.com/ArcGIS/rest/ESRI.ArcGIS.Rest.css"&amp;gt;
 &amp;lt;link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/1.6/js/dojo/dijit/themes/tundra/tundra.css"&amp;gt;
 &amp;lt;style type="text/css"&amp;gt;html, body { height: 100%; width: 100%; margin: 0; padding: 0; }&amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body class="tundra"&amp;gt;
&amp;lt;script type="text/javascript"&amp;gt;var djConfig = {parseOnLoad: true};&amp;lt;/script&amp;gt;
&amp;lt;script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=1.6"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script type="text/javascript" src="/ArcGIS/rest/services?f=json&amp;amp;callback=var ws_results ="&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script type="text/javascript"&amp;gt;
 dojo.require("dijit.layout.BorderContainer");
 dojo.require("dijit.layout.ContentPane");
 dojo.require("esri.map");
 var map;
 var hostName = document.location.host;
 function Init() {
&amp;nbsp; map = new esri.Map("mapDiv");
&amp;nbsp; //cycles through REST services and adds MapServer services to map
&amp;nbsp; for(var i=0; i&amp;lt;ws_results.services.length; i++){
&amp;nbsp;&amp;nbsp; if (ws_results.services&lt;I&gt;.type == 'MapServer') {
&amp;nbsp;&amp;nbsp;&amp;nbsp; layer = new esri.layers.ArcGISDynamicMapServiceLayer("http://" + hostName + "/ArcGIS/rest/services/" + ws_results.services&lt;I&gt;.name + "/MapServer");
&amp;nbsp;&amp;nbsp;&amp;nbsp; map.addLayer(layer);
&amp;nbsp;&amp;nbsp; }
&amp;nbsp; }
&amp;nbsp; //resize the map when the browser resizes
&amp;nbsp; var resizeTimer;
&amp;nbsp; dojo.connect(map, 'onLoad', function(theMap) {
&amp;nbsp;&amp;nbsp; dojo.connect(dijit.byId('mapDiv'), 'resize', function() {&amp;nbsp; //resize the map if the div is resized
&amp;nbsp;&amp;nbsp;&amp;nbsp; clearTimeout(resizeTimer);
&amp;nbsp;&amp;nbsp;&amp;nbsp; resizeTimer = setTimeout( function() {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.resize();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.reposition();
&amp;nbsp;&amp;nbsp;&amp;nbsp; }, 500);
&amp;nbsp;&amp;nbsp; });
&amp;nbsp; });
 }
 dojo.addOnLoad(Init);
&amp;lt;/script&amp;gt;
 &amp;lt;div id="mapContainer" dojotype="dijit.layout.BorderContainer" design="headline" gutters="false" style="width: 100%; height: 100%; margin: 0;"&amp;gt;
&amp;nbsp; &amp;lt;div id="mapDiv" dojotype="dijit.layout.ContentPane" region="center" style="overflow:hidden;"&amp;gt;
&amp;nbsp; &amp;lt;/div&amp;gt;
 &amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:00:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/odd-behavior-map-service-often-doesn-t-load-first/m-p/662209#M14847</guid>
      <dc:creator>MatthewLawton</dc:creator>
      <dc:date>2021-12-12T04:00:19Z</dc:date>
    </item>
    <item>
      <title>Re: Odd Behavior - map service often doesn't load first attempt.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/odd-behavior-map-service-often-doesn-t-load-first/m-p/662210#M14848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The above solution has been running for several days and I have seen a noticeable improvement in responsiveness. I have not seen the "sleepy" service problem show up since it has been implemented.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Nov 2010 21:14:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/odd-behavior-map-service-often-doesn-t-load-first/m-p/662210#M14848</guid>
      <dc:creator>MatthewLawton</dc:creator>
      <dc:date>2010-11-03T21:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: Odd Behavior - map service often doesn't load first attempt.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/odd-behavior-map-service-often-doesn-t-load-first/m-p/662211#M14849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Matthew,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How do you implement the above code. Is this a stand alone code or does it go somewhere in&amp;nbsp; the viewer? Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Nov 2010 14:30:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/odd-behavior-map-service-often-doesn-t-load-first/m-p/662211#M14849</guid>
      <dc:creator>KomanDiabate</dc:creator>
      <dc:date>2010-11-05T14:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: Odd Behavior - map service often doesn't load first attempt.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/odd-behavior-map-service-often-doesn-t-load-first/m-p/662212#M14850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I tried it with and without spaces before posting.&amp;nbsp; Would not run on my server, but runs fine on my pc.&lt;BR /&gt;I agree no change is map service display; it�??s about 50/50 for me.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Try also to "run it as Administrator". For example, run a cmd as administrator and execute it directly and I think it shouldl work well, at least for me it does. If you want to run it as a automated task in Windows 2008, you have to mark in the general tab the checkbox with a text similar to "run it with elevated privileges" (I don't know what's exactly the label of the checkbox in the english version of the operating system).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope it helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jul 2013 11:23:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/odd-behavior-map-service-often-doesn-t-load-first/m-p/662212#M14850</guid>
      <dc:creator>SantiagoHorcajo</dc:creator>
      <dc:date>2013-07-19T11:23:32Z</dc:date>
    </item>
  </channel>
</rss>

