+2 votes

I want to use your FTP component on aspx page that runs entirely on the web server (IIS). I have to connect to a remote SSL FTP server that uses a certificate.

I get "The remote certificate is invalid according to the validation procedure" error when I try to connect.

I guess that is because the addhandler code is not being executed on the webserver (that only applies to a client (actual person I think).

How can I connect?

by

1 Answer

0 votes
 
Best answer

1.
Make sure you have add the event handler and accept the certificate by setting e.IsValid = true. As described here:
FTP: The remote certificate is invalid according to the validation procedure

client.ServerCertificateValidate += (sender, e) => {e.IsValid = true; };
client.ConnectSSL("ftp.example.org");

The handler code is executed on the server.

by (301k points)
...