<?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 How to connect to a secure ArcGIS Server using HTTPS and a PKI (X509) Certificate in ArcGIS Runtime SDK for WPF (Retired) Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/how-to-connect-to-a-secure-arcgis-server-using/m-p/72883#M321</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;All of our ArcGIS Servers must be secured using HTTPS and an X509/PKI certificate. The IE and Firefox browsers know how to transmit the certificate to the server when it�??s requested, thus we were able to secure our server in this way and deploy our application using Flex. Now we are looking into writing a WPF application using the new ArcGIS WPF Runtime. If I create a simple WPF application that has a map and one ArcGISDynamicMapServiceLayer, where that layer's URL is set to HTTPS on a server that requires a X509 certificate to be sent, I get an error that it could not create the SSL/TSL connection. Makes sense to me because this simple WPF client application did not send the server the certificate.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was able to get the X509 Certificate with the following code. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-family:Courier New;"&gt;X509Store pX509Store = new X509Store(StoreName.My, StoreLocation.CurrentUser);&lt;BR /&gt;pX509Store.Open(OpenFlags.ReadOnly);&lt;BR /&gt;X509Certificate2 pX509Certificate2 = X509Certifiate2UI.SelectFromCollection(pX509Store.Certificate, "Title", "Message", X509SelectionFlag.SingleSelection)[0];&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then this is the code to create a map and add a map service layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-family:Courier New;"&gt;ESRI.ArcGIS.Client.ArcGISTiledMapServiceLayer = pArcGISTiledMapServiceLayer = new ESRI.ArcGIS.Client.ArcGISTiledMapServiceLayer();&lt;BR /&gt;pArcGISTiledMapServiceLayer.Url = &lt;A href="https://server.com/arcgis/rest/services/Imagery/MapServer;"&gt;https://server.com/arcgis/rest/services/Imagery/MapServer;&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;ESRI.ArcGIS.Client.Map map = new ESRI.ArcGIS.Client.Map();&lt;BR /&gt;map.Layers.Add(pArcGISTiledMapServiceLayer);&lt;BR /&gt;&lt;BR /&gt;this.grid.Children.Add(map);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So now the problem is what to do with the X509Certificate? The ArcGISTiledMapServiceLayer has a Credentials Property that wants something that implements System.Net.ICredentials. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-family:Courier New;"&gt;pArcGISTiledMapServiceLayer.Credentials = ???? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know the .NET HttpWebRequest Object has a CllientCertificate method so it can make the connection but I do not see how to do this with the Map and an ArcGISDynamicMapServiceLayer. So right now I am trying to understand how to get something that Implements ICredentials from an X509Certificate or from some other way...if that is even possible. I cannot find anything in our documentation that mentions X509/PKI. I do not think the ICredential Interface and the X509Certiicate Class have anything to do with each other. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone know if it�??s possible to connect to a server that requires the client application to transmit the X509 certificate when the server is requesting it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Apr 2012 20:24:14 GMT</pubDate>
    <dc:creator>EricPaitz</dc:creator>
    <dc:date>2012-04-12T20:24:14Z</dc:date>
    <item>
      <title>How to connect to a secure ArcGIS Server using HTTPS and a PKI (X509) Certificate</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/how-to-connect-to-a-secure-arcgis-server-using/m-p/72883#M321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;All of our ArcGIS Servers must be secured using HTTPS and an X509/PKI certificate. The IE and Firefox browsers know how to transmit the certificate to the server when it�??s requested, thus we were able to secure our server in this way and deploy our application using Flex. Now we are looking into writing a WPF application using the new ArcGIS WPF Runtime. If I create a simple WPF application that has a map and one ArcGISDynamicMapServiceLayer, where that layer's URL is set to HTTPS on a server that requires a X509 certificate to be sent, I get an error that it could not create the SSL/TSL connection. Makes sense to me because this simple WPF client application did not send the server the certificate.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was able to get the X509 Certificate with the following code. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-family:Courier New;"&gt;X509Store pX509Store = new X509Store(StoreName.My, StoreLocation.CurrentUser);&lt;BR /&gt;pX509Store.Open(OpenFlags.ReadOnly);&lt;BR /&gt;X509Certificate2 pX509Certificate2 = X509Certifiate2UI.SelectFromCollection(pX509Store.Certificate, "Title", "Message", X509SelectionFlag.SingleSelection)[0];&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then this is the code to create a map and add a map service layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-family:Courier New;"&gt;ESRI.ArcGIS.Client.ArcGISTiledMapServiceLayer = pArcGISTiledMapServiceLayer = new ESRI.ArcGIS.Client.ArcGISTiledMapServiceLayer();&lt;BR /&gt;pArcGISTiledMapServiceLayer.Url = &lt;A href="https://server.com/arcgis/rest/services/Imagery/MapServer;"&gt;https://server.com/arcgis/rest/services/Imagery/MapServer;&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;ESRI.ArcGIS.Client.Map map = new ESRI.ArcGIS.Client.Map();&lt;BR /&gt;map.Layers.Add(pArcGISTiledMapServiceLayer);&lt;BR /&gt;&lt;BR /&gt;this.grid.Children.Add(map);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So now the problem is what to do with the X509Certificate? The ArcGISTiledMapServiceLayer has a Credentials Property that wants something that implements System.Net.ICredentials. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-family:Courier New;"&gt;pArcGISTiledMapServiceLayer.Credentials = ???? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know the .NET HttpWebRequest Object has a CllientCertificate method so it can make the connection but I do not see how to do this with the Map and an ArcGISDynamicMapServiceLayer. So right now I am trying to understand how to get something that Implements ICredentials from an X509Certificate or from some other way...if that is even possible. I cannot find anything in our documentation that mentions X509/PKI. I do not think the ICredential Interface and the X509Certiicate Class have anything to do with each other. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone know if it�??s possible to connect to a server that requires the client application to transmit the X509 certificate when the server is requesting it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Apr 2012 20:24:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/how-to-connect-to-a-secure-arcgis-server-using/m-p/72883#M321</guid>
      <dc:creator>EricPaitz</dc:creator>
      <dc:date>2012-04-12T20:24:14Z</dc:date>
    </item>
  </channel>
</rss>

