Skip to content
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.

Commit

Permalink
added FTP request method to request object in FTP test
Browse files Browse the repository at this point in the history
  • Loading branch information
maxijabase committed Jun 11, 2023
1 parent 4ad6953 commit dc2ab21
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Utils/Models/FTP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,13 @@ public async Task<bool> TestConnection()
}
else if (requestUri.Scheme == "ftp")
{
var requestDir = WebRequest.Create(requestUri);
requestDir.Credentials = new NetworkCredential(_user, _pass);
requestDir.Timeout = 5000;
var request = WebRequest.Create(requestUri);
request.Method = WebRequestMethods.Ftp.ListDirectoryDetails;
request.Credentials = new NetworkCredential(_user, _pass);
request.Timeout = 5000;
try
{
var response = await requestDir.GetResponseAsync();
var response = await request.GetResponseAsync();
}
catch (Exception ex)
{
Expand Down

0 comments on commit dc2ab21

Please sign in to comment.