Hi Robert,Is there a way I can change this to flex viewer 2.3.1. I am looking for something like you mentioned in your post http://forums.esri.com/Thread.asp?c=158&f=2421&t=280353What I have done ..1.Removed token tag from config.xml completely.2. Received token from the Arcgis server in init() function of Mapmanager.mxml using httpservice.3. Used it in the case "dynamic": of mapmanager.mxml as dynlayer.token=received token.4.On these steps I cannot see the mapservice in the first place. When I refresh, I see the service working (through Fiddler), also in TOC, but cannot see the map. Again does not work for any other browser than IE.I saw your post in 2009 relating similar issue.Below is your suggestion.How can I translate this to flex viewer 2.3.1
//In the Config.xml for each secured map service add
token="x"
//In the ConfigManager.as look for the
//================================================
//map
//section and add
var msToken:String = mapserviceList.@token;
//right above 'var msLabel:String = mapserviceList.@label;'
//then replace
var mapservice:Object =
{
label: msLabel,
type: msType,
visible: msVisible,
alpha: msAlpha,
url: msURL
}
//with
var mapservice:Object =
{
label: msLabel,
type: msType,
visible: msVisible,
alpha: msAlpha,
url: msURL,
token: msToken
}
//Now in MapManger look for 'for (i = 0; i < configData.configMap.length; i++)'
//and add
var token:String = configData.configMap.token;
//to the list of vars
//Then look for case "tiled": and add
if(token)
tiledlayer.token = token;
//before 'map.addLayer(tiledlayer);'
//Then look for case "dynamic": and add
if(token)
dynlayer.token = token;
//before 'map.addLayer(dynlayer);'
//That should do it.
Really appreciate your feedback.Thank you.