hello,
I try to enter a ftp server with the login and password to retrieve the list of files, but apparently it shows me an error of law 401 I think, but in FileZila I managed to get to server with the same information, what I need to do to access the server,
the message in the info is : The remote server returned an error: (401) Unauthorized.
static void testconnexionFTP(Args _args)
{
object ftpo;
System.Net.FtpWebRequest request;
System.IO.StreamReader reader;
System.Net.NetworkCredential credential;
System.Net.FtpWebResponse response;
System.String text;
XmlDocument xmldoc;
;
try
{
ftpo = System.Net.WebRequest::Create("">ftp://nas.company.com/");
request = ftpo;
credential = new System.Net.NetworkCredential(“login”,“password”);
request.set_Credentials(credential);
response = request.GetResponse();
reader = new System.IO.StreamReader(response.GetResponseStream());
text = reader.ReadToEnd();
info(text);
}
catch(Exception::CLRError)
{
throw error(AifUtil::getClrErrorMessage());
}
}
Best Regards.