locked
FTP over SSL with certificate RRS feed

  • Question

  • User-807313774 posted

    Hi All,

     I have to write code for file upload on FTP server over SSL. I am tring to connect the the server with FtpWebRequest class. EnableSSL is set to true. Now When I am calling GetRequestStream() function, I am getting error messge _ The remote certificate is invalid according to the validation procedure!!.

    To get an SSL server, I am using self signed SSL certificate on Linux machine ( where my FTP-SSL server is). I am able to connect to the server using ftp client i.e. winscp. but not using code. 

    I know that I can override the ServerCertificateValidationCallback method to remove this validation and this works too. But the issue is with this someone with expired certificate can also upload file and that's not right. 

    Can somebody sugget me why am I getting this error? Is it because I am using self signed certificate? How can I properly solve the issue?

    Tuesday, October 29, 2013 11:07 AM

Answers