Differences

This shows you the differences between the selected revisions of the page.

2014-09-11 2014-10-15
tls#certificate (martin) avoid using pageant for automation (martin)
Line 7: Line 7:
  * Environment variables referenced in script are not resolved, because they are not set by the service's account.   * Environment variables referenced in script are not resolved, because they are not set by the service's account.
  * Access to files on mapped network drives fails, because the drives are not mapped for the service's account.   * Access to files on mapped network drives fails, because the drives are not mapped for the service's account.
 +  * You rely on [[ui_pageant|Pageant authentication]], but the Pageant is running in a different Windows session, so it cannot talk to an automated instance of WinSCP.((Learn about [[http://blogs.technet.com/b/voy/archive/2007/02/23/services-isolation-in-session-0-of-windows-vista-and-longhorn-server.aspx|Windows Session 0 isolation]].))
To check what [[config|configuration storage]] is used, whether a site name was recognized or under what Windows account the script is running, inspect a beginning of [[logging|session log]]. For example, following log shows that the configuration was read from Windows registry, the script was running under local account ''martin'' and ''mysession'' was recognized as a site name. To check what [[config|configuration storage]] is used, whether a site name was recognized or under what Windows account the script is running, inspect a beginning of [[logging|session log]]. For example, following log shows that the configuration was read from Windows registry, the script was running under local account ''martin'' and ''mysession'' was recognized as a site name.
Line 31: Line 32:
    * Alternatively use [[config|INI file]] instead of registry to store the configuration to make sure the [[session_configuration#site|site]] (and/or other settings) can be accessed by all accounts. ((You can also [[config#transfer|transfer the site]] (and/or other settings) to the service's account instead.))     * Alternatively use [[config|INI file]] instead of registry to store the configuration to make sure the [[session_configuration#site|site]] (and/or other settings) can be accessed by all accounts. ((You can also [[config#transfer|transfer the site]] (and/or other settings) to the service's account instead.))
    * Good practice is to develop your scripts with [[scripting#configuration|configuration isolated from GUI]].     * Good practice is to develop your scripts with [[scripting#configuration|configuration isolated from GUI]].
 +  * Instead of Pageant authentication, use explicit private key authentication (using ''[[scriptcommand_open|-privatekey]]'' and ''[[scriptcommand_open|-passphrase]]'' switches).
When dealing with SSIS see also guide to [[guide_ssis|SFTP task in SSIS]]. When dealing with SSIS see also guide to [[guide_ssis|SFTP task in SSIS]].

Last modified: by martin