If you are having problems setting the password to the FTP task in SSIS, then the likelyhood is you are trying to use an expression to set it (can’t be done); you are being caught out by clicking [OK] (finger trouble) in the FTP connection manager editor, or you are struggling with the encryption settings (a long subject) for your package.
I don’t want to enter into discussion here on the encryption level you use (I will discuss that in another post some other time), merely this post just contains some simple code that you can use to set the password with a script component placed before the FTP task.
It takes the value of a variable “FTPPassword” and uses it to set the FTP connection manager property “ServerPassword”.
Public Class ScriptMain
Public Sub Main()
Dim FTPConnectionManager As ConnectionManager
'Set variable to an existing connection manager
FTPConnectionManager = Dts.Connections("FTP Server")
'Set connection manager property "ServerPassword"
Dts.TaskResult = Dts.Results.Success