TOCGroup widget proxy problems

806
3
Jump to solution
09-25-2013 11:23 AM
GerardoGarcia
New Contributor III
We are currently using rscheitlin's TOCGroup widget version 3.1, in our 3.3 Flex Viewer app. I've enabled secure proxy application via asp.net. However, it seems the list of services in "<includedLayers>" tag of the TOCGroupWidget.xml file causes a "login" popup to appear for all the secured/proxy-enabled services. If I set "Identitymanager...enabled = false" then the popups don't appear nor are there any errors. However, is there a better way to include the proxy url in a config or do I need to change the source of the TOCGroup widget to correctly honor the proxy service? Let me know if I need more explanation and thanks for any help.

jerry
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
GerardoGarcia
New Contributor III
So, I needed to come back to this issue as setting IdentityManager to false was not that great of a solution. I found that a simple edit in TOC.as would allow the honoring of the proxy on services which were accessed by id/layer-index (e.g. http://site.com/arcgis/rest/MyService/Mapserver/12).

We are using the TOC Group Widget for Flex Viewer 3.1 (which I believe is widget version 3.1.5 according to "VERSION" const in TOCGroupWidget.mxml) and in this file near (or at) line 618, I needed to change this,

var arc:ArcGISDynamicMapServiceLayer = new ArcGISDynamicMapServiceLayer(msName.substring(0,msName.lastIndexOf("/")));


to this,

var arc:ArcGISDynamicMapServiceLayer = new ArcGISDynamicMapServiceLayer(msName.substring(0,msName.lastIndexOf("/")),FeatureLayer(layer).proxyURL);


where I include a new parameter (second parameter) in the "new" ArcGISDynamicMapServiceLayer declaration.

So far this has worked. Hopefully this will help out anyone who has the same problem.

View solution in original post

0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus
Jerry,

   This was an issue that I believe was addressed in a later release from 3.1 and as this widget is now retired I am not remembering much about it right now. The replacement widget the Enhanced LayerList widget (3.4) does not have this issue either.
0 Kudos
GerardoGarcia
New Contributor III
Ah! So, instead of the TOCGroup widget we should be using the "Enhanced LayerList widget"? Either way I'll take a look at the newer TOC widget. Thanks for the help, as always.

jerry
0 Kudos
GerardoGarcia
New Contributor III
So, I needed to come back to this issue as setting IdentityManager to false was not that great of a solution. I found that a simple edit in TOC.as would allow the honoring of the proxy on services which were accessed by id/layer-index (e.g. http://site.com/arcgis/rest/MyService/Mapserver/12).

We are using the TOC Group Widget for Flex Viewer 3.1 (which I believe is widget version 3.1.5 according to "VERSION" const in TOCGroupWidget.mxml) and in this file near (or at) line 618, I needed to change this,

var arc:ArcGISDynamicMapServiceLayer = new ArcGISDynamicMapServiceLayer(msName.substring(0,msName.lastIndexOf("/")));


to this,

var arc:ArcGISDynamicMapServiceLayer = new ArcGISDynamicMapServiceLayer(msName.substring(0,msName.lastIndexOf("/")),FeatureLayer(layer).proxyURL);


where I include a new parameter (second parameter) in the "new" ArcGISDynamicMapServiceLayer declaration.

So far this has worked. Hopefully this will help out anyone who has the same problem.
0 Kudos