Search widget and secured services

497
2
08-15-2013 07:02 PM
LisaArnold
New Contributor II
I am using secured services in my Flex viewer application and running into an issue. I am generating a token for my secured services using the HTTP referer method. Even though I generate it for a year something happens where a few days after implementing it, the service stops passing the token through and I have to login to the map service when accessing the application. Though the token isn't actually expired because I can login in successfully, it just isn't being passed through.

When the token is being passed through, when attempting to use the search widget (the Esri one, not the enhanced search widget) I am prompted to login to the service. I should not have to login for the search widget. There is no place in the search widget configuration to put the token. When the token isn't passed through and I have to login to the service to get it to draw, then the search widget works and does not prompt me to login to the service.

Any thoughts on what might be going on are appreciated.
Tags (2)
0 Kudos
2 Replies
MattPohl
Occasional Contributor II
Lisa,

Not sure on the fist one... I have never had any problems like that. In regards to the search widget I know there is no tag for a token like in the eSearch, but have you tried passing the token directly in the url? Example:

<url>https://yourServerName/ArcGIS/rest/services/yourServiceName/MapServer/0?token=theTokenString...


I don't use the stock Search Widget, but I tested this on my setup and it seemed to pass the token just fine without a need to login to the secured service. Just a thought

Matt
0 Kudos
LisaArnold
New Contributor II
Hi Matt,
That worked on the search issue, thanks very much! I put a new token once again, hopefully it will keep working this time on the other issue. Thank you for the response.
0 Kudos