Let's try this:var serverInfo = new esri.ServerInfo(); serverInfo.server = 'https://www.mymanatee.org'; serverInfo.tokenServiceUrl = 'https://www.mymanatee.org/arcgis/tokens/generateToken'; esri.id.registerServers([serverInfo]); Can you let us know if that works?
var serverInfo = new esri.ServerInfo(); serverInfo.server = 'https://www.mymanatee.org'; serverInfo.tokenServiceUrl = 'https://www.mymanatee.org/arcgis/tokens/generateToken'; esri.id.registerServers([serverInfo]);
What is version of ArcGIS Server are you using (including service pack)?
{ "currentVersion" : 10.02, "soapUrl" : "http://WEBAPI20BETA/arcgis/services", "secureSoapUrl" : "https://WEBAPI20BETA:443/arcgis/services", "authInfo" : { "isTokenBasedSecurity" : true, "tokenServicesUrl" : "https://servicesbeta.esri.com/ArcGIS/tokens" } }
2.5 tried to guess the tokenServiceUrl but 2.6 does not. Can you post the response from your REST info endpoint? Here's an example using servicesbeta.esri.com: http://servicesbeta.esri.com/ArcGIS/rest/info?f=json&pretty=trueAnd the response: { "currentVersion" : 10.02, "soapUrl" : "http://WEBAPI20BETA/arcgis/services", "secureSoapUrl" : "https://WEBAPI20BETA:443/arcgis/services", "authInfo" : { "isTokenBasedSecurity" : true, "tokenServicesUrl" : "https://servicesbeta.esri.com/ArcGIS/tokens" } }
Hmm, having trouble I get garbage back. � This is a secure service (obviously) with ssl enabled.
Do you see a call to /ArcGIS/info when you load your page? You should see this in firebug or chrome dev tools.You can see this in our identity manager sample: https://servicesbeta.esri.com/demos/widget/widget_identifymanager.html
Looking forward to what you find.
anything else i can test in the meantime?
{ "currentVersion": 10.03, "soapUrl": <snip> "secureSoapUrl": <snip> "authInfo": {"isTokenBasedSecurity": false} }
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).
arcgis/rest/info does not resolve to the server that has the security on it. We only allow access to the sub folder.
var serverInfo = new esri.ServerInfo(); serverInfo.server = 'http://sampleserver3.arcgisonline.com'; serverInfo.tokenServiceUrl = 'http://sampleserver3.arcgisonline.com/arcgis/tokens/generateToken'; esri.id.registerServers([serverInfo]);
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]);
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.htm
esri.ServerInfo is not a constructor[Break On This Error] var serverInfo = new esri.ServerInfo();
Where are you running that code? It should be inside a function called by dojo.ready.
Nice! Glad we finally got that sorted.
Are you running the code posted previously at the top of your function that dojo.ready calls?
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.