PrintTask using Proxy does not work with secured layers

3411
9
05-22-2014 05:05 AM
MiriEshel
New Contributor III
Hi,

I'm trying to build an application that points to a secured layer.
I use proxy that gets a token for the secured layer so that the user does not have to type user &password.
When I try to print the map using the Ptint widget, it gives me an error, no matter if I use the proxy in the Print widget or not.
Enclosed with  the Print error.
The proxy and the Print task service are on the same machine so the PrintTask should recognize the proxy.

Is there a way to use the Print widget to print a secured layer?
When the layer is not secured, it works fine.

Here is the text that I put in proxy.config:
    <serverItem url="http://serverName/arcgis/rest/services"
                matchAll="true" tokenUrl="http://serverName/arcgis/tokens"
                username="user" password="password"
      timeout="60" />

Moreover, if I don't use the proxy and the  user has to type user & password in the beginning, it also works fine.
Only the combination of Proxy & Print service & and secured service does not work.

I use Flex Viewer version 3.6.

Thanks a lot,
Miri
Tags (2)
0 Kudos
9 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor
Miri Eshel,

   Have you added the useproxy tag to your PrintWidget.xml? Documentation:

http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Print_widget_tags/01m30000001n0...
0 Kudos
MiriEshel
New Contributor III
Hi Robert,

As I wrote, when I use either useProxy="true" or useProxy="false" it does not work.
Is that what you mean?

Thanks,
Miri
0 Kudos
MiriEshel
New Contributor III
Hi,

Did someone ever try it? It is really easy to reproduce:

1. Secure a service with a token

2. Add the next lines to the proxy.config (replace the servername with a real name):

<serverItem url="http://serverName/arcgis/rest/services"
matchAll="true" tokenUrl="http://serverName/arcgis/tokens"
username="user" password="password"
timeout="60" />

3. Add  the proxy URL in Settings

4. Use the Print widget with whatever Print service you choose.

Thanks,
Miri
0 Kudos
GISDev1
Occasional Contributor III
Hi,

Did someone ever try it? It is really easy to reproduce:

1. Secure a service with a token

2. Add the next lines to the proxy.config (replace the servername with a real name):

<serverItem url="http://serverName/arcgis/rest/services"
matchAll="true" tokenUrl="http://serverName/arcgis/tokens"
username="user" password="password"
timeout="60" />

3. Add  the proxy URL in Settings

4. Use the Print widget with whatever Print service you choose.

Thanks,
Miri


Post your exact config.xml, printwidget.xml, and proxy.config with fake credentials.
0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor
Hi Robert,

As I wrote, when I use either useProxy="true" or useProxy="false" it does not work.
Is that what you mean?

Thanks,
Miri


Miri,

    Maybe your issue is that all attributes/tags in the ArcGIS Viewer for Flex are lower case. It is important to read the documentation as the useproxy is a tag element and not an attribute as you have posted.

<useproxy>true</useproxy>
0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor
Miri,

  Actually after reading the documentation further. I see that the useproxy tag in the print widget xml is for when your print service is secure. So that is unlikely your issue.

Here is some help documentation for print secure services:

http://resources.arcgis.com/en/help/main/10.1/index.html#//0154000005q3000000

and another thread on this:

http://forums.arcgis.com/threads/67400-token-based-security-and-10.1-printing-gp-service

I don't use secure services (except in test for forum post) so I don't have much experience in this area.
0 Kudos
MiriEshel
New Contributor III
Hi Robert,

Exactly. I don't need the useProxy tag in the print widget since the print service is not secured.
I read the links but couldn't find a solution to my problem.

I guess I will have no choice other than avoid using proxy for the secured layers and let the user typr user & password in the beginning.
In this case it works.

Pity....

Thanks,
Miri
0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor
Miri,

   A call to esri tech support is your best avenue.
0 Kudos
AlexeiB
Occasional Contributor

Were you able to find a solution to this issue? I am facing a similar problem and am trying to find a better work-around than what I have now.

Thanks,

Alexei

0 Kudos