I might really need some professional assistance and thoughts in I think I have many questionmarks at the same time and do not really know where to start. (However Godaddy says that FTP-SSL is up and running on my account). "Is there a certificate or what is wrong ?" I am checking if sp.Certificate = null and when running the code the label1 is showing: I have found a code that I "think" is checking if there even is a certificate that is received. ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(ValidateServerCertificate) Public static bool ValidateServerCertificate(Object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)Ģ) Create the RemoteCertificateValidationCallback delegate using the method defined in the preceding code example and assign it to the ServerCertificateValidationCallback property of the ServicePointManager class. My question is if this is something that is relevant to my problem ? However I am not really sure about the logic in the code also. "The method in the following code example simply allows all certificates." As in the information on the link, it is said that: What I wonder is if this code is needed to accept the FTP-SSL certificate when logging in. I have come over some information where it perheps is nessecary to accept all certificates here: I have done a research but though it is difficult and diffus to find information what is nessecary to add in the code. Use SSL to transfer User and Password secure Has to be in my code (They don´t have any coding support). Godaddy says that if it is any wrong anywhere it I am really stuck and really wonder if something is missing out in the code below or if anything has to be changed. ": The remote certificate is invalid according to the validation procedure" The Exceptionerror that I get in the catch event says this: I have removed ":21" from port but when I try this code with enableSsl = true So now is my big question if I really have the connectioncode correct to do the connection over FTP-SSL ? If you are developing an application that requires connecting to FTP over a secure connection, pleaseīe sure you have your coding set properly to use FTP-SSL as the connection method. There is nothing further you need to do to use FTP-SSL with your account. > FTP-SSL is enabled and working on your account. I have now for the past 2 days have an email discussion with godaddy about the FTP-SSL and this is now the answer about my hostingaccount wich ofcourse is positive: ResponseStream = objResponse.GetResponseStream() Get the stream of file with the response: ObjResponse = (FtpWebResponse) objRequest.GetResponse() Then, we have to get the response for this request: Create just "Creates" a new WebRequest for that path, then comes the actions: First a request to FTP Server shall be initiated, requesting the file needed. "true", I beleive the UserName and Password would be encrypted ? So I really wonder and cant figure this out what that is depending on because if the connection would work when the flag is set to "false", then the connection works fine to the FTP. However when I do that, the connection failes every time but if I set the flag to My complete code is the below and here I have set this flag to "true". I red it through and they were talking about enable the SSL.Īt my hostingprovider Godaddy I have activated the SSL Certificate 1 year ahead, so I beleive this should be the FTP-SSL where I can do the connection ? Thank you gunteman, it was a very good article. SSH and SSL encryption for FTP connections Please refer to these articles and threads to get more ideas for your problem. This article demostrate that how to finish it in asp.net in detail. How to connect to a remote FTP server using SSL and C#.NET? If this is the case, I suggest you refer to the following articles to get some ideas: What is needed to do in order to do this connection encrypted ?īased on your description, it seems that you want to encript the username and password as you connect to the FTP server in asp.net. ObjRequest.Credentials = new NetworkCredential( "User" , ObjRequest = (FtpWebRequest)WebRequest.Create(FilePath) (These are some of the lines when doing the connection) I have heard about that there is a way to encrypt the UserName and Password when logging in to the server but I dont know how thisĪre there any lines that I will have to add during the connection ? Normally whe you login to a FTP Server, the UserName and Password travels as plain "text" wich could be "Hijacked" on the way. I wonder what the way is to Login to my FTP server with encrypted UserName and Password ?
0 Comments
Leave a Reply. |