question

Upvotes
Accepted
1 1 1 1

FTP - A connection attempt failed......

The Solution in short:

App Service running .Net App
Always on is set to On.

The App are Downloading file and fileinfo from Ftp server using WinSCP in the C# code.

From Log file:
"A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond."

It seems to fail at the code part:

var sessionOptions = new SessionOptions()
{
Protocol = Protocol.Ftp,
HostName = _hostName,
UserName = _userName,
Password = _password,
TimeoutInMilliseconds = 60000,
};
_session = new Session();
_session.DisableVersionCheck = true;
_session.DebugLogLevel = 0;
_session.ExecutablePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory + "winscp.exe");
_session.Open(sessionOptions)


The error only occurs when vi run the App on Azure, I cannot recreate the error in Debug on my local machine. If I debug the App local, it seems to get the production App on Azure to start running.


I do not know if I have to change the WinSCP settings in the code, or I should change the settings in Azure App Service.


rdp-apirefinitiv-data-platform
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hello @kepc ,

Thank you for your participation in the forum.

Is the reply below satisfactory in resolving your query?

If yes, please click the 'Accept' text next to the appropriate reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

-AHS

Hello @kepc ,

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

-AHS

1 Answer

· Write an Answer
Upvotes
Accepted
22.1k 59 14 21

Hi @kepc,

We can only answer questions pertaining to Refinitiv products and technology. Please ask your generic programming question on StackOverFlow or Microsoft forums.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.