Re: 'System.NullReferenceException' occurred (General questions)
I got the same error when hardcoding the string values.
I am not showing the actual values.
By the way, this same code works when called from a background thread of NUnit. It fails when called from a Windows Form.
uploadServer.sftpClient = new WeOnlyDo.Client.SFTP();
uploadServer.sftpClient.LicenseKey = --- ;
uploadServer.sftpClient.Hostname = 149.59.1.72 ;
uploadServer.sftpClient.Login = --- ;
uploadServer.sftpClient.Password = --- ;
uploadServer.sftpClient.Blocking = true;
uploadServer.sftpClient.Timeout = 60;
uploadServer.sftpClient.RemotePath = remotePath; // has to be set again repeatedly in Upload
uploadServer.sftpClient.Connect();