'Export Image' failed with: System.UnauthorizedAccessException: Access to the path '\\Servername\SampleFolder\Sampleimage.png' is denied in TIBCO Spotfire Automation Services

'Export Image' failed with: System.UnauthorizedAccessException: Access to the path '\\Servername\SampleFolder\Sampleimage.png' is denied in TIBCO Spotfire Automation Services

book

Article ID: KB0074835

calendar_today

Updated On:

Products Versions
Spotfire Automation Services 7.5 and higher

Description

TIBCO Spotfire Automation Services task to export images or data to external file fail with the error - 'Export Image' failed with: System.UnauthorizedAccessException: Access to the path '\\Servername\SampleFolder\Sampleimage.png' is denied.

Cause:

1). File path is not defined under AllowFilepath configuration.

2). The Node Manager Service Account does not have appropriate permission to the folder.

Issue/Introduction

Automation Services - 'Export Image' failed with: System.UnauthorizedAccessException: Access to the path '\\Servername\SampleFolder\Sampleimage.png' is denied.

Resolution


> Confirm that the Node Manager service account has read access to the Shared drive.

By default allowedFilePaths allowAll value is set to "True" , but if you see the above error then the value maybe set to "False.
Below are the steps to update the configuration:
  • Follow the instructions from the below KB article to export the existing or old configuration
  • Update the Spotfire.Dxp.Worker.Automation.config  exported at <Spotfire Server Install>\tomcat\bin\config folder(for version 10.2 and lower) and <Spotfire Server Install>\tomcat\spotfire-bin\config (for 10.3 and higher)
  • If you want to be able to export to any folder then the allowAll attribute should be set to "True" e.g. <allowedFilePaths allowAll="True">
  • Or add path in the below section with the path you would want to all the automation service job to export
===================

<allowedFilePaths allowAll="false">
     <add path=".\Temp\" />
     <add path="C:\Temp\" />
     <add path="\\MyServer\Spotfire Exported PDF\" />

</allowedFilePaths>
====================

  • Save the config file and import it as follows.

config import-service-config  --config-name="AllowExportpath"

  • Provide the config Tool Password when prompted.
  • Login to the Spotfire Admin console > Open "Nodes and Services".
  • Click on Automation Service > Click "Edit"on the right hand top corner.
  • Select the new configuration and update.
NOTE: If the Node Manager is running as Local System Account, grant local system account access to the shared path following steps in https://serverfault.com/questions/135867/how-to-grant-network-access-to-localsystem-account

Additional Information

Refer to the section - Set Security on a Folder Before You Share It -  on how to set folder permission.
 
https://support.microsoft.com/en-us/help/323420/how-to-share-files-and-folders-over-a-network-for-workgroups-in-windows-server-2003