Select to view content in your preferred language

TOC With Security Issue

685
2
05-12-2010 02:01 PM
weiliang
Deactivated User
I tried to embed a Table of Content into our website (the source code developed by jgalang from ESRI community website), but since we use secured map services (not token based), the code doesn't work successfully. I don't know if any body encountered this problem before could help me out. Or there is any other solution I can adopt.

Thanks,
Wei
0 Kudos
2 Replies
JasonKnisley
Deactivated User
I'm assuming you are using the version of jgalang's code which included proxy.ashx and proxy.config.  I'm also assuming that since you aren't using tokens but said they are secure services, you are using Windows Authentication.  If the above is all true, you should be able to get jgalang's TOC to work by adding the following to proxy.config:

<serverItem url="http://YOUR_SERVER/ArcGIS/rest/services/"
            matchAll="true" username="YOUR_USERNAME" password="YOUR_PASSWORD"/>

Then in your application, for each of your secure services/layers that you add to the map make sure you set ProxyUrl = "../proxy.ashx"

That should do the trick.

If you have ArcGIS Server 10SP1 installed, you can also try ESRI's legend control (http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#LegendWithTemplates).  If you have an older version of ArcGIS Server, the legend control will probably not work with your secured services (but will still work with unsecured services).
0 Kudos
BenSher
Deactivated User
That did the trick.  Change from old esritoolkit:legend to esri:legend.  Thanks!
0 Kudos