<?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: Slow map loading and ChallengeHandler delay - Token vs Certificate in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/slow-map-loading-and-challengehandler-delay-token/m-p/1637764#M13618</link>
    <description>&lt;P&gt;Good news, &lt;A href="https://www.esri.com/arcgis-blog/products/developers/announcements/whats-new-in-arcgis-maps-sdks-for-native-apps-200-8" target="_self"&gt;Maps SDK 200.8.0 was just released&lt;/A&gt;, and it includes a fix for this issue. The workaround is not necessary any more.&lt;/P&gt;</description>
    <pubDate>Wed, 30 Jul 2025 19:05:33 GMT</pubDate>
    <dc:creator>MatveiStefarov</dc:creator>
    <dc:date>2025-07-30T19:05:33Z</dc:date>
    <item>
      <title>Slow map loading and ChallengeHandler delay - Token vs Certificate</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/slow-map-loading-and-challengehandler-delay-token/m-p/1608432#M13499</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;After upgrading to 200.7 I am experiencing that my map is taking forever to load. While a large map with manygrouplayers, subgroups and various layers on them I expect it to take a little while,. In 200.6 it is relatively smooth, but all the layers load within 4-5 seconds.&lt;/P&gt;&lt;P&gt;I have logged all ChallengeHandler requests, and I can that there is a big difference on how these are logged.&lt;/P&gt;&lt;P&gt;On version 200.6, all the 49 challenges are flooded to the output window within the span of 4 seconds.&lt;/P&gt;&lt;P&gt;On version 200.7, the same challenges takes a drip-drip-drip approach, and takes several minutes. Each drip is roughly 6 challenges every 100 seconds, which corresponds to the default timeout. The layers don't finish loading until all the challenges have completed, which takes 10 minutes.&lt;/P&gt;&lt;P&gt;I notice that there is only one challenge for Token, and the remaining 48 challenges are for Certification, which I do not understand.&amp;nbsp;I've updated my ChallengeHandler to use the default handler when the request is for certificate, though having the user confirm that dialog 49 times is not particularly user friendly, though I am trying to to figure out how to accept it without user interaction&lt;/P&gt;&lt;P&gt;Questions:&lt;/P&gt;&lt;P&gt;1. Why is the loading/authentication so incredibly slow and come in bursts on 200.7? It is obviously an issue introduced in the latest version&lt;BR /&gt;2. Is there something that I can do to work around the slow map loading? I've not yet done anything with&amp;nbsp; interceptors or ArcGISHttpMessageHandler as described &lt;A href="https://www.esri.com/arcgis-blog/products/sdk-net/developers/new-auth-apis-for-dotnet-sdk&amp;nbsp;" target="_self"&gt;here&lt;/A&gt;,&amp;nbsp; as it hoped it was automatically wired up, but I'll investigate this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2025 12:57:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/slow-map-loading-and-challengehandler-delay-token/m-p/1608432#M13499</guid>
      <dc:creator>BjørnarSundsbø1</dc:creator>
      <dc:date>2025-04-23T12:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: Slow map loading and ChallengeHandler delay - Token vs Certificate</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/slow-map-loading-and-challengehandler-delay-token/m-p/1608536#M13502</link>
      <description>&lt;P&gt;I've tested with an custom interceptor to log any timeouts, I've narrowed down some requests.&amp;nbsp;&lt;SPAN&gt;ArcGISHttpMessageHandler&amp;nbsp;appears to be automatically introduced so no magic there needed.&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;internal class &lt;/SPAN&gt;&lt;SPAN&gt;CustomMapsInterceptor &lt;/SPAN&gt;: &lt;SPAN&gt;IHttpMessageInterceptor&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;public async &lt;/SPAN&gt;&lt;SPAN&gt;Task&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;HttpResponseMessage&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;SendAsync&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;HttpMessageInvoker &lt;/SPAN&gt;&lt;SPAN&gt;invoker, &lt;/SPAN&gt;&lt;SPAN&gt;HttpRequestMessage &lt;/SPAN&gt;&lt;SPAN&gt;message, &lt;/SPAN&gt;&lt;SPAN&gt;CancellationToken &lt;/SPAN&gt;&lt;SPAN&gt;cancellationToken)&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    {&lt;BR /&gt;&lt;/SPAN&gt;        &lt;SPAN&gt;var &lt;/SPAN&gt;&lt;SPAN&gt;stopwatch = &lt;/SPAN&gt;&lt;SPAN&gt;System.Diagnostics.&lt;/SPAN&gt;&lt;SPAN&gt;Stopwatch&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;StartNew&lt;/SPAN&gt;&lt;SPAN&gt;();&lt;BR /&gt;&lt;/SPAN&gt;        &lt;SPAN&gt;try&lt;BR /&gt;&lt;/SPAN&gt;        &lt;SPAN&gt;{&lt;BR /&gt;&lt;/SPAN&gt;            &lt;SPAN&gt;var &lt;/SPAN&gt;&lt;SPAN&gt;response = &lt;/SPAN&gt;&lt;SPAN&gt;await &lt;/SPAN&gt;&lt;SPAN&gt;invoker.&lt;/SPAN&gt;&lt;SPAN&gt;SendAsync&lt;/SPAN&gt;&lt;SPAN&gt;(message, cancellationToken);&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;            stopwatch.&lt;/SPAN&gt;&lt;SPAN&gt;Stop&lt;/SPAN&gt;&lt;SPAN&gt;();&lt;BR /&gt;&lt;/SPAN&gt;            &lt;SPAN&gt;Log&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Logger&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Information&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"Request to &lt;/SPAN&gt;&lt;SPAN&gt;{Url}&lt;/SPAN&gt;&lt;SPAN&gt; completed in &lt;/SPAN&gt;&lt;SPAN&gt;{Duration}&lt;/SPAN&gt;&lt;SPAN&gt;ms"&lt;/SPAN&gt;&lt;SPAN&gt;, message.&lt;/SPAN&gt;&lt;SPAN&gt;RequestUri&lt;/SPAN&gt;&lt;SPAN&gt;, stopwatch.&lt;/SPAN&gt;&lt;SPAN&gt;ElapsedMilliseconds&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;BR /&gt;&lt;/SPAN&gt;            &lt;SPAN&gt;return &lt;/SPAN&gt;&lt;SPAN&gt;response;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;        }&lt;BR /&gt;&lt;/SPAN&gt;        &lt;SPAN&gt;catch &lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;TaskCanceledException &lt;/SPAN&gt;&lt;SPAN&gt;ex) &lt;/SPAN&gt;&lt;SPAN&gt;when &lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;!&lt;SPAN&gt;cancellationToken.&lt;/SPAN&gt;&lt;SPAN&gt;IsCancellationRequested&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;        {&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;            stopwatch.&lt;/SPAN&gt;&lt;SPAN&gt;Stop&lt;/SPAN&gt;&lt;SPAN&gt;();&lt;BR /&gt;&lt;/SPAN&gt;            &lt;SPAN&gt;Trace&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;WriteLine&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;$"Request to &lt;/SPAN&gt;&lt;SPAN&gt;{message.&lt;/SPAN&gt;&lt;SPAN&gt;RequestUri&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt; timed out after &lt;/SPAN&gt;&lt;SPAN&gt;{stopwatch.&lt;/SPAN&gt;&lt;SPAN&gt;Elapsed&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;TotalSeconds&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;s"&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;BR /&gt;&lt;/SPAN&gt;            &lt;SPAN&gt;throw new &lt;/SPAN&gt;&lt;SPAN&gt;TimeoutException&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;$"The request to &lt;/SPAN&gt;&lt;SPAN&gt;{message.&lt;/SPAN&gt;&lt;SPAN&gt;RequestUri&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt; timed out."&lt;/SPAN&gt;&lt;SPAN&gt;, ex);&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;        }&lt;BR /&gt;&lt;/SPAN&gt;        &lt;SPAN&gt;catch &lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Exception&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;        {&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;            stopwatch.&lt;/SPAN&gt;&lt;SPAN&gt;Stop&lt;/SPAN&gt;&lt;SPAN&gt;();&lt;BR /&gt;&lt;/SPAN&gt;            &lt;SPAN&gt;Trace&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;WriteLine&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;$"Request to &lt;/SPAN&gt;&lt;SPAN&gt;{message.&lt;/SPAN&gt;&lt;SPAN&gt;RequestUri&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt; failed after &lt;/SPAN&gt;&lt;SPAN&gt;{stopwatch.&lt;/SPAN&gt;&lt;SPAN&gt;Elapsed&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;TotalSeconds&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;s"&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;BR /&gt;&lt;/SPAN&gt;            &lt;SPAN&gt;throw&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;        }&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    }&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;This is the log information I get. There is a timeout for data?f=json of 100 seconds, and two seconds after that it attempts to challenge.&lt;/P&gt;&lt;P&gt;Request to &lt;A href="https://my.portal.no/portal/sharing/rest/content/items/1b64d928f5eb41feb8d670aecdd13db1/data?f=json" target="_blank"&gt;https://my.portal.no/portal/sharing/rest/content/items/1b64d928f5eb41feb8d670aecdd13db1/data?f=json&lt;/A&gt; failed after 100,6283715 seconds&lt;BR /&gt;Challenged for Certificate for &lt;A href="https://my.portal.no/portal/sharing/rest/content/items/1b64d928f5eb41feb8d670aecdd13db1/data" target="_blank"&gt;https://my.portal.no/portal/sharing/rest/content/items/1b64d928f5eb41feb8d670aecdd13db1/data&lt;/A&gt; 102,8218895 seconds after first Credential Challenge&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2025 15:18:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/slow-map-loading-and-challengehandler-delay-token/m-p/1608536#M13502</guid>
      <dc:creator>BjørnarSundsbø1</dc:creator>
      <dc:date>2025-04-23T15:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: Slow map loading and ChallengeHandler delay - Token vs Certificate</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/slow-map-loading-and-challengehandler-delay-token/m-p/1609089#M13511</link>
      <description>&lt;P&gt;It appears that we might have identified the scenario to recreate the issue, though no sample application. Starting out with a description:&lt;/P&gt;&lt;P&gt;The loaded map is a WebMap. The map contains many feature layers that have been added as items rather than direct URI to the service. The webmap is shared with the user and works with the token, though the map items (feature layers) are not shared with the same user.&amp;nbsp;&lt;/P&gt;&lt;P&gt;When loading the map we get a token challenge for the first layer which is successful, but the token under the same path does not authenticate against the unshared layers which leads to the certificate challenge.&lt;/P&gt;&lt;P&gt;The map loads «fine» and all layers enter loaded state when there are less than 6 feature layers without authentication, but the map data for the «failed» layers does not render (or lead to LoadStatus.Failed). Adding more than 6 layers than leads to 100 second timeouts and the user having to wait 10 minutes for all the timeouts to be reached for the 48 layers without permission and load state set to !Loading and !Failed.&lt;/P&gt;&lt;P&gt;Sharing the items with the correct user appears to fix the issue, though this seems to be an issue introduced in 200.7.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Apr 2025 22:25:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/slow-map-loading-and-challengehandler-delay-token/m-p/1609089#M13511</guid>
      <dc:creator>BjørnarSundsbø1</dc:creator>
      <dc:date>2025-04-24T22:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: Slow map loading and ChallengeHandler delay - Token vs Certificate</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/slow-map-loading-and-challengehandler-delay-token/m-p/1630158#M13594</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;SPAN&gt;Bjørnar,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I was able to reproduce the problem.&amp;nbsp; A fix will be released in a future version of the Maps SDK for .NET, but I also have a workaround that should help you now.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The timeout happens when a webmap with many inaccessible items is being loaded.&amp;nbsp; Maps SDK 200.7 added new error-detection logic for some load failures, that makes an additional network request to gather more details.&amp;nbsp; Unfortunately it keeps the original HTTP connection open while making this additional request.&amp;nbsp; Many items failing to load at the same time&amp;nbsp;exhausts the connection pool and nothing can progress until one of the requests times out.&amp;nbsp; The default connections-per-server limit happens to be 6.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Fortunately this connection limit is easy to raise. Set &lt;A href="https://developers.arcgis.com/net/api-reference/api/netwin/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Http.HttpConfigurationExtensions.UseMaxConnectionsPerServer.html#Esri_ArcGISRuntime_Http_HttpConfigurationExtensions_UseMaxConnectionsPerServer_Esri_ArcGISRuntime_Http_IArcGISHttpConfiguration_System_Int32_" target="_self"&gt;MaxConnectionsPerServer&lt;/A&gt; to a higher value value when configuring Runtime:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;ArcGISRuntimeEnvironment.Initialize(config =&amp;gt; config
    .ConfigureHttp(http =&amp;gt; http
        .UseMaxConnectionsPerServer(20)
    )
    // the rest of configuration goes here
);&lt;/LI-CODE&gt;&lt;P&gt;Please let me know if this works for you.&amp;nbsp; I will also update this thread when a proper bugfix is released.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jul 2025 20:37:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/slow-map-loading-and-challengehandler-delay-token/m-p/1630158#M13594</guid>
      <dc:creator>MatveiStefarov</dc:creator>
      <dc:date>2025-07-03T20:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: Slow map loading and ChallengeHandler delay - Token vs Certificate</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/slow-map-loading-and-challengehandler-delay-token/m-p/1637764#M13618</link>
      <description>&lt;P&gt;Good news, &lt;A href="https://www.esri.com/arcgis-blog/products/developers/announcements/whats-new-in-arcgis-maps-sdks-for-native-apps-200-8" target="_self"&gt;Maps SDK 200.8.0 was just released&lt;/A&gt;, and it includes a fix for this issue. The workaround is not necessary any more.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jul 2025 19:05:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/slow-map-loading-and-challengehandler-delay-token/m-p/1637764#M13618</guid>
      <dc:creator>MatveiStefarov</dc:creator>
      <dc:date>2025-07-30T19:05:33Z</dc:date>
    </item>
  </channel>
</rss>

