<?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 accessing secured services in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/accessing-secured-services/m-p/187807#M1746</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi there, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;i'm trying to access a service on a secured arcgis server like the example provided in the help:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt; AGSCredential* cred = [[AGSCredential alloc] initWithUser:@"mydomain\myusername" password:@"mypassword"]; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; //pass the credential to layer or task &amp;nbsp;&amp;nbsp;&amp;nbsp; AGSDynamicMapServiceLayer *thelayer = [AGSDynamicMapServiceLayer dynamicMapServiceLayerWithURL:[NSURL URLWithString:@"https://myServer.com/ArcGIS/rest/services/DynamicLayerName/MapServer"] credential:cred ];&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; [self.myMapView addMapLayer:thelayer withName:@"Layer Name"];&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;results in this error...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Error Domain=NSURLErrorDomain Code=-1012 "The operation couldn???t be completed. (NSURLErrorDomain error -1012.)" UserInfo=0x81c6430 &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;NSErrorFailingURLKey=&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://myServer.com/ArcGIS/rest/services/DynamicLayerName/MapServer?f=json" rel="nofollow" target="_blank"&gt;https://myServer.com/ArcGIS/rest/services/DynamicLayerName/MapServer?f=json&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can browse to this service in a browser with these credentials, and view the service and its layers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;One thing of note, I have not set any security on the arcgis server, my security is set via IIS as basic with https.&amp;nbsp; Is it the case that my AGSCredential can't be used for basic https authentication??&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 29 Jan 2012 16:49:11 GMT</pubDate>
    <dc:creator>MichaelBlom</dc:creator>
    <dc:date>2012-01-29T16:49:11Z</dc:date>
    <item>
      <title>accessing secured services</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/accessing-secured-services/m-p/187807#M1746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi there, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;i'm trying to access a service on a secured arcgis server like the example provided in the help:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt; AGSCredential* cred = [[AGSCredential alloc] initWithUser:@"mydomain\myusername" password:@"mypassword"]; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; //pass the credential to layer or task &amp;nbsp;&amp;nbsp;&amp;nbsp; AGSDynamicMapServiceLayer *thelayer = [AGSDynamicMapServiceLayer dynamicMapServiceLayerWithURL:[NSURL URLWithString:@"https://myServer.com/ArcGIS/rest/services/DynamicLayerName/MapServer"] credential:cred ];&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; [self.myMapView addMapLayer:thelayer withName:@"Layer Name"];&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;results in this error...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Error Domain=NSURLErrorDomain Code=-1012 "The operation couldn???t be completed. (NSURLErrorDomain error -1012.)" UserInfo=0x81c6430 &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;NSErrorFailingURLKey=&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://myServer.com/ArcGIS/rest/services/DynamicLayerName/MapServer?f=json" rel="nofollow" target="_blank"&gt;https://myServer.com/ArcGIS/rest/services/DynamicLayerName/MapServer?f=json&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can browse to this service in a browser with these credentials, and view the service and its layers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;One thing of note, I have not set any security on the arcgis server, my security is set via IIS as basic with https.&amp;nbsp; Is it the case that my AGSCredential can't be used for basic https authentication??&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Jan 2012 16:49:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/accessing-secured-services/m-p/187807#M1746</guid>
      <dc:creator>MichaelBlom</dc:creator>
      <dc:date>2012-01-29T16:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: accessing secured services</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/accessing-secured-services/m-p/187808#M1747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've also tried to create my credentials with a third parameter:&amp;nbsp;&amp;nbsp; authenticationType:AGSAuthenticationTypeHTTP]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but no luck.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;also, I know that my cert is authorised -&amp;nbsp; previously I had pointed to a dynamicfeaturelayer service on my dev server whose certificate isn't authorised, and i was getting errors that pointed to this, so now i'm referencing services on my prod arcgis server, which does have trusted certs (i.e. I don't get prompted with a "certificate is untrusted" warning), but I still can't pull my dynamicfeaturelayer into my map.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Jan 2012 18:07:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/accessing-secured-services/m-p/187808#M1747</guid>
      <dc:creator>MichaelBlom</dc:creator>
      <dc:date>2012-01-29T18:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: accessing secured services</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/accessing-secured-services/m-p/187809#M1748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;argh, solved it: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;replaced:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;@"mydomain\myaccount"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;with:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;@"mydomain\\myaccount"&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Jan 2012 18:12:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/accessing-secured-services/m-p/187809#M1748</guid>
      <dc:creator>MichaelBlom</dc:creator>
      <dc:date>2012-01-29T18:12:48Z</dc:date>
    </item>
  </channel>
</rss>

