I have written a SFTP connection, which is connecting to a secure domain host (MBox location) in .NET Core:
IPHostEntry ip = Dns.GetHostEntry(Host);
using (SftpClient client = new SftpClient(ip.ToString(), Port, User, Password))
{
//connect to client
client.Connect();
var files = client.ListDirectory(PathToRead).ToList();
......
//wait for downloads to finish
await Task.WhenAll(tasks);
// disconnect the client by closing connection
client.Disconnect();
}
which is hosted in Azure App service with subscription and Azure AD configured as per my client's domain. When I am running the code I am seeing the following error:
Error in FTP connection. Exception: System.Net.Sockets.SocketException (11001): No such host is known
Can you please help.