Last post Oct 30, 2013 02:08 AM by Tanmay.in
Oct 29, 2013 11:07 AM|Tanmay.in|LINK
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?
Oct 30, 2013 02:08 AM|Tanmay.in|LINK
code in this link has solved my problem properly: http://msdn.microsoft.com/en-us/library/dd633677(v=exchg.80).aspx