Error when receiving multiple files

Apr 1, 2014 at 6:25 PM
I'm having an issue when attempting to receive multiple files. I get the following error. I'm using VS2012 with the SSIS tools. I modified the sample to use my correct paths (see below).

Please help.
public void Main()
    {

        List<ISFTPFileInfo> fileList = new List<ISFTPFileInfo>();
        fileList.Add(new SFTPFileInfo() { RemotePath = "/Reports/FEOS/LOB_20140205_220231.pgp", LocalPath = @"C:\Output\LOB_20140205_220231.pgp", OverwriteDestination = true });
        fileList.Add(new SFTPFileInfo() { RemotePath = "/Reports/FEOS/LOB_20140225_221504.pgp", LocalPath = @"C:\Output\LOB_20140225_221504.pgp", OverwriteDestination = true });
        Dts.Variables["test"].Value = fileList;
        Dts.TaskResult = (int)ScriptResults.Success;
        Dts.TaskResult = (int)ScriptResults.Success;
    }

    #region ScriptResults declaration
    /// <summary>
    /// This enum provides a convenient shorthand within the scope of this class for setting the
    /// result of the script.
    /// 
    /// This code was generated automatically.
    /// </summary>
    enum ScriptResults
    {
        Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
        Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
    };
    #endregion

}
SSIS package "C:\Users\Josh\Desktop\LiveTech\LiveTech\ETL.dtsx" starting.
Error: 0x0 at SFTP Task 1, Execute: : TypeConverter cannot convert from System.String.
at System.ComponentModel.TypeConverter.GetConvertFromException(Object value)
at System.ComponentModel.TypeConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
at SSIS.Extensions.Common.GetVariableValue[T](String varName, VariableDispenser variableDispenser)
at SSIS.Extensions.SFTPTask.SFTPTask.Execute(Connections connections, VariableDispenser variableDispenser, IDTSComponentEvents componentEvents, IDTSLogging log, Object transaction)
Task failed: SFTP Task 1
Warning: 0x80019002 at ETL: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
SSIS package "C:\Users\Josh\Desktop\LiveTech\LiveTech\ETL.dtsx" finished: Failure.
The program '[996] DtsDebugHost.exe: DTS' has exited with code 0 (0x0).