I've developed a python script for use in a web application, which works fine for public services, but does not work with secure services. I've setup some code in the script to hopefully handle secure services:
serverConnection is a variable, which holds the path to a user connection to the arcgis server
So I can publish it to server and print public map services, but secure services come back with this:
Unable to connect to map server at ..."},{"type":"esriJobMessageTypeInformative","description":"Layer \"Licences\": Unable to connect to map server at http://gis.mstn.govt.nz/arcgis/rest/services/RegulatoryAndInspection/Licences/MapServer?token=I-eon3AsL00-hfH4H74iiWQ1t25ARRnpJrofyxvdiaG3ozl_ZXVwc9wBPozzFply8bS9AXyCFrikUZQ6nWW5_w..."},{"
So I've setup the tokens to pass in a flex app and the tokens are HTTP Referrer (in fact I've tried lots of different token options but nothing works!). Why does it have this error?
serverConnection is a variable, which holds the path to a user connection to the arcgis server
Code:
server = {}
server['SERVER_CONNECTION_FILE'] = serverConnection
result = arcpy.mapping.ConvertWebMapToMapDocument(webmapJSON, templateMxd, extra_conversion_options=server)
Unable to connect to map server at ..."},{"type":"esriJobMessageTypeInformative","description":"Layer \"Licences\": Unable to connect to map server at http://gis.mstn.govt.nz/arcgis/rest/services/RegulatoryAndInspection/Licences/MapServer?token=I-eon3AsL00-hfH4H74iiWQ1t25ARRnpJrofyxvdiaG3ozl_ZXVwc9wBPozzFply8bS9AXyCFrikUZQ6nWW5_w..."},{"
So I've setup the tokens to pass in a flex app and the tokens are HTTP Referrer (in fact I've tried lots of different token options but nothing works!). Why does it have this error?