<?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: Map Server Layer pulled from URL with invalid security certificate in Kotlin Maps SDK Questions</title>
    <link>https://community.esri.com/t5/kotlin-maps-sdk-questions/map-server-layer-pulled-from-url-with-invalid/m-p/1311727#M154</link>
    <description>&lt;P&gt;Hello &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/612915"&gt;@klebercj&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;It seems that the dev server you are trying to use is self-signed and the connection is being refused.&lt;/P&gt;&lt;P&gt;You have a couple options:&lt;/P&gt;&lt;P&gt;1. Install the root certificate in your device so that the device automatically trusts the dev server you are trying to access.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; - To verify that this was done correctly, try going to the dev server using your mobile browser and you won't get the ""Accept the Risk and Continue" message anymore.&lt;/P&gt;&lt;P&gt;2. Create a &lt;A href="https://developers.arcgis.com/kotlin/api-reference/arcgis-maps-kotlin/com.arcgismaps.httpcore.authentication/-network-authentication-challenge-handler/index.html" target="_self"&gt;NetworkAuthenticationChallengeHandler&lt;/A&gt; that returns a &lt;EM&gt;ServerTrust&lt;/EM&gt; network credential when the &lt;EM&gt;NetworkAuthenticationType&lt;/EM&gt; is of type &lt;EM&gt;ServerTrust.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; - &lt;STRONG&gt;Warnign:&lt;/STRONG&gt; This will trust all self-signed server certificates and should only be used in test environments and NOT for production.&lt;/EM&gt;&lt;/P&gt;&lt;LI-CODE lang="kotlin"&gt;override suspend fun handleNetworkAuthenticationChallenge(challenge: NetworkAuthenticationChallenge): NetworkAuthenticationChallengeResponse {
        return when (challenge.networkAuthenticationType) {
            ...
            is NetworkAuthenticationType.ServerTrust -&amp;gt;
                NetworkAuthenticationChallengeResponse.ContinueWithCredential(ServerTrust)
            }
            ...
        }
    }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jul 2023 19:57:37 GMT</pubDate>
    <dc:creator>Erick_1</dc:creator>
    <dc:date>2023-07-25T19:57:37Z</dc:date>
    <item>
      <title>Map Server Layer pulled from URL with invalid security certificate</title>
      <link>https://community.esri.com/t5/kotlin-maps-sdk-questions/map-server-layer-pulled-from-url-with-invalid/m-p/1310666#M138</link>
      <description>&lt;P&gt;I'm attempting to narrow down issues I'm having pulling a map server layer into my Android project.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to pull in a map layer from a dev server and place it on top of an ESRI basemap layer.&amp;nbsp; So far I have had no luck with pulling in the map server layer.&amp;nbsp; The URL for the layer (without identifiable information) is &lt;A href="https://xxxxx-dev.xxxxxxx.net:6400/arcgis/rest/services/..../MapServer" target="_blank"&gt;https://xxxxx-dev.xxxxxxx.net:6400/arcgis/rest/services/..../MapServer&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;I do know these things;&lt;/P&gt;&lt;P&gt;1) My code will pull in an ESRI public map server layer and place it over a base map layer.&lt;/P&gt;&lt;P&gt;2) The URL for the map server I want to pull from makes me "Accept the Risk and Continue" when I look at it through a web browser.&amp;nbsp; The URL uses an invalid security certificate.&lt;/P&gt;&lt;P&gt;3) I don't have the authority to change or update that certificate.&amp;nbsp; This layer is just for dev work though and will not be used in the final product.&lt;/P&gt;&lt;P&gt;I don't know these things;&lt;/P&gt;&lt;P&gt;1) Is the invalid security certificate causing the layer to not render?&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) Is there a way to configure network setting inside the app so that I can continue with development?&lt;/P&gt;&lt;P&gt;3) Am I barking up the wrong tree on this?&lt;/P&gt;&lt;P&gt;Any help would be appreciated&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jul 2023 19:52:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/kotlin-maps-sdk-questions/map-server-layer-pulled-from-url-with-invalid/m-p/1310666#M138</guid>
      <dc:creator>klebercj</dc:creator>
      <dc:date>2023-07-21T19:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: Map Server Layer pulled from URL with invalid security certificate</title>
      <link>https://community.esri.com/t5/kotlin-maps-sdk-questions/map-server-layer-pulled-from-url-with-invalid/m-p/1310726#M139</link>
      <description>&lt;P&gt;Additional info is that this map server I trying to pull from is an ArcGIS server configured with a self-signed certificate.&amp;nbsp; It's communicating through the default 6443 port.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jul 2023 22:18:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/kotlin-maps-sdk-questions/map-server-layer-pulled-from-url-with-invalid/m-p/1310726#M139</guid>
      <dc:creator>klebercj</dc:creator>
      <dc:date>2023-07-21T22:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: Map Server Layer pulled from URL with invalid security certificate</title>
      <link>https://community.esri.com/t5/kotlin-maps-sdk-questions/map-server-layer-pulled-from-url-with-invalid/m-p/1311603#M152</link>
      <description>&lt;P&gt;Anyone have an opinion or idea regarding this?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2023 16:46:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/kotlin-maps-sdk-questions/map-server-layer-pulled-from-url-with-invalid/m-p/1311603#M152</guid>
      <dc:creator>klebercj</dc:creator>
      <dc:date>2023-07-25T16:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: Map Server Layer pulled from URL with invalid security certificate</title>
      <link>https://community.esri.com/t5/kotlin-maps-sdk-questions/map-server-layer-pulled-from-url-with-invalid/m-p/1311727#M154</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/612915"&gt;@klebercj&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;It seems that the dev server you are trying to use is self-signed and the connection is being refused.&lt;/P&gt;&lt;P&gt;You have a couple options:&lt;/P&gt;&lt;P&gt;1. Install the root certificate in your device so that the device automatically trusts the dev server you are trying to access.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; - To verify that this was done correctly, try going to the dev server using your mobile browser and you won't get the ""Accept the Risk and Continue" message anymore.&lt;/P&gt;&lt;P&gt;2. Create a &lt;A href="https://developers.arcgis.com/kotlin/api-reference/arcgis-maps-kotlin/com.arcgismaps.httpcore.authentication/-network-authentication-challenge-handler/index.html" target="_self"&gt;NetworkAuthenticationChallengeHandler&lt;/A&gt; that returns a &lt;EM&gt;ServerTrust&lt;/EM&gt; network credential when the &lt;EM&gt;NetworkAuthenticationType&lt;/EM&gt; is of type &lt;EM&gt;ServerTrust.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; - &lt;STRONG&gt;Warnign:&lt;/STRONG&gt; This will trust all self-signed server certificates and should only be used in test environments and NOT for production.&lt;/EM&gt;&lt;/P&gt;&lt;LI-CODE lang="kotlin"&gt;override suspend fun handleNetworkAuthenticationChallenge(challenge: NetworkAuthenticationChallenge): NetworkAuthenticationChallengeResponse {
        return when (challenge.networkAuthenticationType) {
            ...
            is NetworkAuthenticationType.ServerTrust -&amp;gt;
                NetworkAuthenticationChallengeResponse.ContinueWithCredential(ServerTrust)
            }
            ...
        }
    }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2023 19:57:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/kotlin-maps-sdk-questions/map-server-layer-pulled-from-url-with-invalid/m-p/1311727#M154</guid>
      <dc:creator>Erick_1</dc:creator>
      <dc:date>2023-07-25T19:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: Map Server Layer pulled from URL with invalid security certificate</title>
      <link>https://community.esri.com/t5/kotlin-maps-sdk-questions/map-server-layer-pulled-from-url-with-invalid/m-p/1311794#M156</link>
      <description>&lt;P&gt;Appreciate the response.&amp;nbsp; I'll take a look at this see what I can do.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2023 22:06:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/kotlin-maps-sdk-questions/map-server-layer-pulled-from-url-with-invalid/m-p/1311794#M156</guid>
      <dc:creator>klebercj</dc:creator>
      <dc:date>2023-07-25T22:06:27Z</dc:date>
    </item>
  </channel>
</rss>

