Select to view content in your preferred language

Change in identity manager between 2.5 and 2.6

3481
45
Jump to solution
01-31-2012 07:22 AM
JeffPace
MVP Alum
My identity manager works at 2.5.  I don't have any custom code in it at the moment, it just hits the first secure service and prompts for login (AWESOME THANK YOU)

when I change my application to 2.6, firebug throws and error saying

tokenserviceurl not defined

and hangs login.

What changed?
0 Kudos
45 Replies
derekswingley1
Deactivated User
anything else i can test in the meantime?


Seeing the output from your server's /ArcGIS/info would be good.
0 Kudos
JeffPace
MVP Alum
anything else i can test in the meantime?


2.5 works perfectly.  2.6 no call is being made to token service

its public now

https://www.mymanatee.org/gisapps/mapviewer/index.jsp?type=utilitiesinfrastructure


<removed> for username and password.
0 Kudos
derekswingley1
Deactivated User
What kind of security are you using? I was assuming you were using token based but /ArcGIS/info says that's not enabled:  http://www.mymanatee.org/arcgis/rest/info?f=pjson

{
 "currentVersion": 10.03,
 "soapUrl": <snip>
 "secureSoapUrl": <snip>
 "authInfo": {"isTokenBasedSecurity": false}
}
0 Kudos
JeffPace
MVP Alum
What kind of security are you using? I was assuming you were using token based but /ArcGIS/info says that's not enabled:  http://www.mymanatee.org/arcgis/rest/info?f=pjson

{
 "currentVersion": 10.03,
 "soapUrl": <snip>
 "secureSoapUrl": <snip>
 "authInfo": {"isTokenBasedSecurity": false}
}


yes its token based, it is behind a web application firewall (modproxy).
0 Kudos
JeffPace
MVP Alum
yes its token based, it is behind a web application firewall (modproxy).


arcgis/rest/info does not resolve to the server that has the security on it.  We only allow access to the sub folder.
0 Kudos
JeffPace
MVP Alum
arcgis/rest/info does not resolve to the server that has the security on it.  We only allow access to the sub folder.


{
"currentVersion": 10.03,
"soapUrl": "http://mcg-ap-arcsvr02:8399/arcgis/services",
"secureSoapUrl": "https://mcg-ap-arcsvr02:8343/arcgis/services",
"authInfo": {
  "isTokenBasedSecurity": true,
  "tokenServicesUrl": "http://MCG-AP-ARCSVR02:8399/arcgis/tokens"
}
}
0 Kudos
JeffPace
MVP Alum
had to change mine back.  here is a simple working example

http://www.mymanatee.org/gisapps/mapviewer/test26.htm

uses the 2.6 api and hangs

changing the code to 2.5 it works

http://www.mymanatee.org/gisapps/mapviewer/test25.htm

all i did was take the sample, change the proxy page to my own, remove the feature layer, and change the other layer to my secure service.
0 Kudos
KellyHutchins
Esri Frequent Contributor
It might be worth testing setting the tokenServiceUrl. You can do this using the following code:



  var serverInfo = new esri.ServerInfo();
  serverInfo.server = 'http://sampleserver3.arcgisonline.com';
  serverInfo.tokenServiceUrl = 'http://sampleserver3.arcgisonline.com/arcgis/tokens/generateToken';          
  
  esri.id.registerServers([serverInfo]);
0 Kudos
JeffPace
MVP Alum
It might be worth testing setting the tokenServiceUrl. You can do this using the following code:



  var serverInfo = new esri.ServerInfo();
  serverInfo.server = 'http://sampleserver3.arcgisonline.com';
  serverInfo.tokenServiceUrl = 'http://sampleserver3.arcgisonline.com/arcgis/tokens/generateToken';          
  
  esri.id.registerServers([serverInfo]);


I will try that in the morning.  Curious though, how do you do that if you have more than one secure service on more than one server?
0 Kudos
KellyHutchins
Esri Frequent Contributor
registerServers takes an array of ServerInfo objects so you'd just need to create a ServerInfo object for each server and add it to the array you provide to registerServers. See the IdentityManagerBase help topic for details:

http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm#jsapi/identitymanagerbase.ht...
0 Kudos