Get a customized tour of VisualCron’s automation, integration, and task scheduling capabilities.
Explore VisualCron’s full power at your own pace with a free, all-access trial for 30 days.
c = new Client(); c.LogToFile = true; Connection conn = new Connection(); conn.UseADLogon = true; conn.UseCompression = true; conn.Port = 16444; conn.Address = "vcserver.com"; conn.ConnectionType = Connection.ConnectionT.Remote; s = c.Connect(conn, true); while (!s.Connected) { System.Threading.Thread.Sleep(100); } //I setup a template connection on the server and use its guid to pull it back so I can default some params below ConnectionClass cTemplate = s.Connections.Get("GUID"); ConnectionClass connection = new ConnectionClass(ConnectionClass.ProtocolT.SFTP); connection.Name = "TEST CONNECTION"; connection.Group = "TEST CONNECTION GROUP"; connection.AuthenticationType = ConnectionClass.AuthenticationT.Password; connection.UserName = c.Encrypt("USERNAME"); connection.PassWord = c.Encrypt("PASSWORD"); connection.PasswordAuthentication = true; connection.Host = c.Encrypt("test.com"); connection.Port = 22; connection.EncryptionAlgorithms = cTemplate.EncryptionAlgorithms; connection.KEXAlgorithms = cTemplate.KEXAlgorithms; connection.MACAlgorithms = cTemplate.MACAlgorithms; connection.SecurityMode = ConnectionClass.SecurityModeT.Explicit; connection.AutoAdjustCiphers = true; connection.AutoAdjustFTPCiphers = false; connection.PrivateKeyPath = ""; connection.UseCompression = true; connection.AdjustPasvAddress = false; connection.ACCT = c.Encrypt(""); connection.PrivateKeyPassWord = c.Encrypt(""); connection.SAPExternalUsername = c.Encrypt(""); connection.LogReceived = true; connection.LogSent = true; TestConnectionClass testConnObj = new TestConnectionClass(); testConnObj.Connection = connection; TestConnectionResultClass testResult = s.Connections.Test(testConnObj); System.Threading.Thread.Sleep(1000); Console.WriteLine(testResult.ErrorMessage); Console.WriteLine(testResult.Success.ToString());
© SMA Technologies. All Rights Reserved, 2024 Version: 11.1.28.3988969