Hi @JunYoungLee ,,
Could be this helpful?
FtpWebRequest.Timeout Property
https://learn.microsoft.com/en-us/dotnet/api/system.net.ftpwebrequest.timeout?view=net-6.0
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I'm working on C# WPF, .NET 4.8 Visual Studio 2022 environment.
I'm making an FTP access program, and it's okay to connect to the same FTP address twice, but when I connect the third time, an error occurs saying that the connection time has expired.
I don't know why this error occurs.
I attached my code.
help me.
private void Local1_TrBtn_Click(object sender, RoutedEventArgs e)
{
FtpWebRequest ftpReq = (FtpWebRequest)WebRequest.Create(uiList_textbox[2].Text);
ftpReq.Credentials = new NetworkCredential(source_ftp_info1["id"], source_ftp_info1["pw"]);
ftpReq.Method = WebRequestMethods.Ftp.ListDirectoryDetails;
ftpReq.Timeout = ftp_timeout;
FtpWebResponse resFtp = (FtpWebResponse)ftpReq.GetResponse();
}
Hi @JunYoungLee ,,
Could be this helpful?
FtpWebRequest.Timeout Property
https://learn.microsoft.com/en-us/dotnet/api/system.net.ftpwebrequest.timeout?view=net-6.0
FYI Microsoft recommends you do not use the FTPWebRequest any more.
https://github.com/dotnet/platform-compat/blob/master/docs/DE0003.md