Connection closed by remote host
Published Dec 14 2021 04:48 PM 7,707 Views
Microsoft

You may run into this error message when you try to connect an FTP site in Command Prompt: “Connection closed by remote host”.

Nedim_0-1639529226569.jpeg

 

For the same issue, a third-party FTP client showed this error:

Connection failed. FlowSocketConnector: Failed to conect to target address. Windows error 10060

Nedim_1-1639529226578.jpeg

 

For the server I checked, this issue started occurring after migrating the site from Windows Server 2008 to 2016.

 

Troubleshooting

I’d recommend checking the Event Viewer logs first. You may see these error messages there:

 

Event ID 10
An error has occurred: The configuration section ‘system.ftpServer/security/authentication’ cannot be read

Nedim_2-1639529226588.jpeg

 

I saw two warnings that followed the event above:

Event ID 12
Unable to find schema for config section ‘system.xaml.hosting/httpHandlers’.

Event ID 12
Unable to find schema for config section ‘system.serviceModel/client’.

 

Additionally, IIS Manager showed this error:

Filename: applicationHost.config. Error: Cannot add duplicate collection entry of type ‘add’

Nedim_3-1639529226591.jpeg

 

Solution

For the case I worked on, the cause of this issue was this missing line in the applicationHost.config file:

 

<section name="authentication" overrideModeDefault="Deny" />

 

FTP site started working after adding the line.

 

Note: This line was missing because it didn’t exist in the Windows Server 2008 server at all. It was in the config file for Windows Server 2016 machine but once the site configuration is migrated using Web Deploy from 2008 to 2016 server, the line was removed.

Co-Authors
Version history
Last update:
‎Dec 14 2021 04:48 PM
Updated by: