System.Net.Sockets.SocketException (10060)
See original GitHub issueI am getting System.Net.Sockets.SocketException (10060), while downloading the files from SFTP into Azure Blob storage using C#, and this code is working fine in my local machine(running manually in Visual Studio 2019), but the problem is after published my code into WebJobs it’s getting failed and giving attached Errors.
[05/23/2020 15:31:16 > 36bfb3: SYS INFO] Status changed to Initializing
[05/23/2020 15:31:16 > 36bfb3: SYS INFO] Job directory change detected: Job file 'FileDownloader.dll' timestamp differs between source and working directories.
[05/23/2020 15:31:16 > 36bfb3: SYS INFO] Run script 'run.cmd' with script host - 'WindowsScriptHost'
[05/23/2020 15:31:16 > 36bfb3: SYS INFO] Status changed to Running
[05/23/2020 15:31:17 > 36bfb3: INFO]
[05/23/2020 15:31:17 > 36bfb3: INFO] D:\local\Temp\jobs\triggered\FileDownloader\v1dgfgmq.hla>dotnet FileDownloader.dll
[05/23/2020 15:31:39 > 36bfb3: INFO] An exception has been caught System.Net.Sockets.SocketException (10060): 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.
[05/23/2020 15:31:39 > 36bfb3: INFO] at Renci.SshNet.Abstractions.SocketAbstraction.Connect(IPEndPoint remoteEndpoint, TimeSpan connectTimeout)
[05/23/2020 15:31:39 > 36bfb3: INFO] at Renci.SshNet.Session.SocketConnect(String host, Int32 port)
[05/23/2020 15:31:39 > 36bfb3: INFO] at Renci.SshNet.Session.Connect()
[05/23/2020 15:31:39 > 36bfb3: INFO] at Renci.SshNet.BaseClient.Connect()
[05/23/2020 15:31:39 > 36bfb3: INFO] at FileDownloader.WithSSHHostKey.DownloadFiles() in D:\<I am getting here local solution path even it's ran through webjob>\WithSSHHostKey.cs:line 29
[05/23/2020 15:31:39 > 36bfb3: SYS INFO] Status changed to Success
what is the issue here ?.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:10
Top Results From Across the Web
System.Net.Sockets.SocketException (10060): A ...
This indicates a TCP socket is unable to connect because the remote party didn't respond. Check that the hostname/port is correct, server is ......
Read more >System.Net.Sockets.SocketException (10060 ...
SocketException (10060): A connection attempt failed because the connected party did not properly respond after a period of time, or established ...
Read more >A connection attempt failed because the connected party ...
Net.Sockets.SocketException (10060): A connection attempt failed because the connected party did not properly respond after a period of time, or ...
Read more >Socket error = #10060
10060 is a Connection Time-out error that usually appears when the client does not receive a response from the server for a specific...
Read more >[Solved]-System.Net.Sockets.SocketException (10060)
[Solved]-System.Net.Sockets.SocketException (10060): A connection attempt failed because the connected party did not properly respond after a period of time-C#.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@dineshclinton After so much investigation, we decided to speak with our Azure admin team (different organisation) and got to know that they restricted FTP server to connect external resourves in firewall so that App service IP was not allowed to connect FTP server. We requested them to whitelist that IP and it worked.
In short, there is no issue in Renci dll regarding connection to external ftp. Now we are able to send all files but not sure how much file size it can handle (Curently we are sending max 100 mb file).
Let me know if this resolved your query and sorry for delayed reply 😦
This is a firewall issue. Adding a firewall rule to allow the IP of the application server / local machine would allow the smtp host to connect. After that include protocol logger too to check the logs,