Posted on: 7/20/2014 10:24:39 AM | Views : 442

I want to create directory(folder) on ftp server by using https authentication. I am able to get information about the directory but it is not allowing to create directory.
 Code for create directory is as follows:
private static void CreateDirectory(string szUrl3,string szUsername,string szPassword) {
try { // --------------- MKCOL REQUEST --------------- //
// Create an HTTP request for the URL.
HttpWebRequest httpMkColRequest =(HttpWebRequest) WebRequest.Create(szUrl3);
// Set up new credentials. httpMkColRequest.Credentials = new NetworkCredential(szUsername, szPassword);
// Pre-authenticate the request. httpMkColRequest.PreAuthenticate = true;
ServicePointManager.ServerCertificateValidationCallback =delegate(object s, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) { return true; };
// Define the HTTP method. httpMkColRequest.Met ...

Go to the complete details ...