Using a secured map service

Discussion created by bkrzys on Jan 20, 2011
Latest reply on Mar 12, 2011 by bryt
Per the example below I've been trying to get a secured map service to work, and thus far it's not happening.  This is following the great article on the subject here:


My questions are:

  • Is there anything I am doing wrong?

  • Any suggestions on how to check if the service is setup properly (we can access the "homepage" for the service without any problem, see it in ArcGIS online, etc.)?

  • Any suggestions on how to troubleshoot what isn't working with the connection?

Thanks, Brian.

  // ----- secured map service
  AGSCredential* cred = [[[AGSCredential alloc] initWithUser:@"username" password:@"secret"] autorelease];    
  NSURL* securedUrl = [NSURL URLWithString: @"https://.../rest/services/_Administration/WORLD_Bdv_Opp_pt/MapServer"];  
  AGSDynamicMapServiceLayer* securedLayer = [AGSDynamicMapServiceLayer dynamicMapServiceLayerWithURL:securedUrl credential:cred ];
  [self.mapView addMapLayer:securedLayer withName:@"Secured Data"];