Login  
Search All Forums
Dart Home | PowerTCP FTP for .NET | Custom Development Reply | PowerTCP FTP for .NET Topics | Forums   
AuthorForum: PowerTCP FTP for .NET
Topic: Certificate SSL Handshake / Demo code question
amihlfried

From: West Mifflin, PA USA
Posts: 9
Member Since: 11/30/04
posted December 23, 2004 1:50 PM

I followed the examples and went through all the documention and forums posts and can't figure out what I'm doing wrong here.

My connection is setup as such:
m_Ftp.Server = (string)Page.Session["server"];
m_Ftp.ServerPort = 21;
m_Ftp.Username = (string)Page.Session["user"];
m_Ftp.Password = (string)Page.Session["pass"];
m_Ftp.UseAuthentication = true;
m_Ftp.Connection.SecureProtocol = SecureProtocol.Auto;
m_Ftp.Security = Dart.PowerTCP.SecureFtp.Security.Explicit;

If I change UseAuthentication = false it works fine. I did try changing the SecureProtocol to SSL2 and SSL3 and no luck. I tried adding Passive and no luck.

I have the following in InitializeComponent:
this.m_Ftp.CertificateReceived += new CertificateReceivedEventHandler(this.m_Ftp_CertificateReceived);
 
And I made the change to the demo to have this work for C# ASP.net by declaring private Ftp m_FTP = new ftp(); at the top instead of in the Page_Load section.

i have private void m_Ftp_CertificateReceived defined as in the documentation (minus the code that creates the dialogbox)

Do I need to store the certificate somewhere. The error I'm getting when connecting is (Message,Source,Trace are is my debugging text):

Message: Connection terminated by server during SSL handshake.
Source: Dart.PowerTCP.SecureFtp
Trace: at a.Invoke(Delegate CurrentDelegate, Object[] args) at Dart.PowerTCP.SecureFtp.Ftp.List(String searchPattern, Boolean full) at PowerTCP_SecureFTPClient_CSharp.ListView.RefreshList() in c:\program files\powertcp\secure ftp for .net\samples\c# asp.net\listview\listview.aspx.cs:line 115


Thanks much!
K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted December 23, 2004 5:15 PM

Hi,
All setting UseAuthentication to false does is cause the component to accept all server certificates.
When you set this to true, does your CertificateReceived event handler code even execute?
Thanks,
-ken
Reply | PowerTCP FTP for .NET Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX