Encountering issues while trying to Custom Print maps in ArcGIS that incorporate secured services? A common hurdle arises when your ArcGIS Server utilizes a self-signed certificate. This setup, while standard practice, can prevent the print service from properly accessing secured services, leading to printing failures. The core problem lies in the print service’s inability to leverage the Portal referrers token for authentication when faced with a self-signed certificate.
Fortunately, workarounds exist to bypass this limitation. Two primary methods are available: utilizing short-term tokens and embedding credentials directly into the service.
Short-term tokens offer a quicker, albeit less seamless, solution. If your services are configured for short-term tokens (often the default and recommended setting), initiating your session directly through the web application is key. By accessing the web app URL in a new browser session and signing into your portal account, a token is generated and stored within the web map. This token is then passed to the Print Service, enabling successful access to your secured services for printing. While functional, this approach can be inconvenient for users seeking a more streamlined print workflow.
A more robust, though technically intricate, alternative involves embedding credentials within a script. This method employs a Python script leveraging the ConvertWebMapToArcGISProject
function in ArcGIS Pro, coupled with the ImportCredentials
function. This script essentially automates the process of embedding your site’s credentials, allowing the print service to bypass the certificate issue. However, implementing this script can be challenging, particularly when server configurations rely on copied templates rather than registered folders. Many users report encountering errors during script execution, highlighting the complexity of this workaround.
In summary, while self-signed certificates in ArcGIS Server can create obstacles for custom map printing of secured services, understanding the token-based authentication issue and exploring workarounds like short-term tokens or credential embedding can pave the way for successful printing. Choosing the optimal method depends on your specific needs and technical capabilities.