.NET Framework Bookmark and Share   
 index > Network Class Library (System.Net) > Implementing file uploads using FTPS over SSL
 

Implementing file uploads using FTPS over SSL

Hello

I want to upload files using FTPS over SSL 3. There will be certificate validation of both client and server. Is FtpWebRequest and related .NET classes enough for this purpose or would you suggest going for a third-party API? If .NET will be enough then approx how long will it take to implement the file upload functionality provided no prior experience with FtpWebRequest and related classes?

All help appreciated!
Okash Khawaja

After a bit more research I'll be more specific. My knowledge about CAs and X.509 certificates is limited. Now ServicePointManager.ServerCertificateValidationCallback is used to validate the server certificate on client. My question is how do we validate it? In otherwise what should be the implementation of ServerCertificateValidationCallback delegate?
Also, is there any default validation available? How reliable is that?

  • Edited byOkash Khawaja Wednesday, September 16, 2009 8:22 AMAdd query about default server validation.
  •  
Okash Khawaja
In the validation callback, you need to decide if you are ready to connect to the site, depending on the certificate returned to you.

For eg, assume you are going to "foo.com" . This site might have a certificate with a different common name for eg: "bar.com" . If you still want to connect, you need to implement the cert validation callback.

The default validation callback will make sure that the DNS hostname of the server matches the certificate subject, and makes sure that the certificate is issued by a valid certification authority, and it is not expired, etc. You need to implement your own callback in cases where you know for sure that the cert wont be valid, and that the server is a known good server, for eg: you trust the server, inspite of the certificate.

feroze.
feroze
--
My blog
Feroze Daud

You can use google to search for other answers

Custom Search

More Threads

• NetworkAvailabilitychangedEvent
• How to download a webpage in binary file format?
• How to specify notification (bounce) mails reciever
• SMTP Host Credentials from web.config
• Problem sending an email
• WebClient:UploadFile fails with bigger files
• SmtpException during heavy email processing
• Wireless Network Programming
• UDPClient usage and security sanity check
• Efficient way to connect to a website