gvernar

AGSQueryTask  Secure Service Problem

Discussion created by gvernar on Jan 13, 2011
Latest reply on Feb 9, 2011 by DGoyal-esristaff
We are trying to access a secure REST Layer with AGSQueryTask
the token URL works fine from the browser and the server Certificate is signed from a third party authority.

We are using the following credential to initialize the AGSQueryTask.

AGSCredential *cred = [[[AGSCredential alloc] initWithUser:@"user123"
              password:@"user123"
             authenticationType:AGSAuthenticationTypeToken
              tokenUrl:[NSURL URLWithString:@"https://serverdomain/ArcGIS/tokens/"]] autorelease];


Every query fails  with error.

Error Domain=NSCocoaErrorDomain Code=498 "Invalid token" UserInfo=0x4d90830 {NSLocalizedFailureReason=, NSURL=http://serverdomain/ArcGIS/rest/services/kallikratis/MapServer/0/query?spatialRel=esriSpatialRelIntersects&outFields=*&returnGeometry=false&where=RECID22token=7             114365750ken22Efag3e0IUOMsoV5Rdg-gCikwvNAhBCp-mz2cPaIY7vlEBWUhOdvOoDWWF6Njsc2222expires2222-1073750072&f=json, NSLocalizedDescription=Invalid token}


Please help.

Outcomes