AnsweredAssumed Answered

javascript Print Secured Service

Question asked by dmortenson on May 27, 2014
Latest reply on Mar 10, 2018 by mcin8130
This seems to be a popular question, but with few answers.

I have a intranet website that uses one secured service in a directory called Secure. All services in this directory have been secured and show up as map services using a proxy as anticipated.  The problem comes with the printing.

I have followed the directions as described on this website:

I have put the secured ExportWebMapSecure service in the Secure directory mentioned above. (I have also tried it in my customized public utilities, with no more success.)

It doesn't work. 

Couple of questions:
1) What is the proper way to call the proxy for the print.js?  I have tried two ways:

              urlPrefix: "http://server_for_gis/arcgis/rest/services/Secure",
              proxyUrl: "http://server_for_web/apps/gis/Proxy/proxy.ashx"

B: = "http://server_for_web/apps/gis/Proxy/proxy.ashx";

2) If I were to test the  service directly using JSON,  how do I include the proxy?  On this page:
It doesn't mention the proxy. It only has the token. So it's not very helpful to test the proxy.

"operationalLayers": [
  "id" : "mytheme",
                "opacity": 1,
                "visibility": true,
                "url": "http://server_for_gis/arcgis/rest/services/Secure/mytheme/MapServer"

3)  The error message I get right now is this. Even when there isn't any secured services being called.

http://server_for_web/apps/gis/Proxy/proxy.ashx?http://server_for_gis/arcgis/rest/services/Secure/ExportWebMapSecure/GPServer/Export%20Web%20Map?f=json status: 500"

This is using the following in my print.js:
              urlPrefix: "http://server_for_gis/arcgis/rest/services/Secure",
              proxyUrl: "http://server_for_web/apps/gis/Proxy/proxy.ashx"

4) Should the ExportWebMap be in the Secure directory?

Thank you in advance for any clarification you can make.