AnsweredAssumed Answered

accessing secured services

Question asked by blomm on Jan 29, 2012
Latest reply on Jan 29, 2012 by blomm
Hi there,
i'm trying to access a service on a secured arcgis server like the example provided in the help:

  
 AGSCredential* cred = [[AGSCredential alloc] initWithUser:@"mydomain\myusername" password:@"mypassword"];                 //pass the credential to layer or task     AGSDynamicMapServiceLayer *thelayer = [AGSDynamicMapServiceLayer dynamicMapServiceLayerWithURL:[NSURL URLWithString:@"https://myServer.com/ArcGIS/rest/services/DynamicLayerName/MapServer"] credential:cred ];           [self.myMapView addMapLayer:thelayer withName:@"Layer Name"];


results in this error...
Error Domain=NSURLErrorDomain Code=-1012 "The operation couldn???t be completed. (NSURLErrorDomain error -1012.)" UserInfo=0x81c6430
NSErrorFailingURLKey=https://myServer.com/ArcGIS/rest/services/DynamicLayerName/MapServer?f=json

I can browse to this service in a browser with these credentials, and view the service and its layers.
One thing of note, I have not set any security on the arcgis server, my security is set via IIS as basic with https.  Is it the case that my AGSCredential can't be used for basic https authentication??

Thanks,
Mike

Outcomes