I have an FTP server and a login and password I have to create a button that tests the connection for access to an FTP server with a login and password, how can I do it
best regards.
str ftpAddress = 'ftp://ftp.company.com'; str username = 'user'; str password = 'password'; System.Object ftpo = System.Net.WebRequest::Create(ftpAddress); System.Net.FtpWebRequest request = ftpo; request.set_Credentials(new System.Net.NetworkCredential(username, password)); request.set_Method("PWD"); try { request.GetResponse(); info('All OK'); } catch(Exception::CLRError) { error(AifUtil::getClrErrorMessage()); }