Topic "FTP secure not accepting Certificate in .NET assembly"

Author Message
Marcel7819
[View user's profile]

Joined: 2012-07-19
Posts: 2
Location: usa va
Hi

I can't connect to a filezilla ftp server using the .Net assembly and the certificate that i generated for the connection.

but I can connect to the filezilla ftp server using the command prompt window with the certificate. any ideas why?

my connection to the server requires ftps with implicit option.

I'm using a Powershell script..
here is my session options that I'm using.
$sessionOptions = New-Object WinSCP.SessionOptions
$sessionOptions.Protocol = [WinSCP.Protocol]::ftp
$sessionOptions.HostName = "0.0.0.0"
$sessionOptions.FtpMode = 'Active'
$sessionOptions.PortNumber = "990"
$sessionOptions.FtpSecure= 'Implicit'
$sessionOptions.UserName = "u"
$sessionOptions.Password = "u"
$sessionOptions.SslCertificate = 'C:\FZ_Cert.crt'
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
The SessionOptions.SslCertificate accepts certificate fingerprint, such as "44:9c:68:38:0a:42:09:51:35:83:42:65:65:5e:97:8d:2e:d1:27:5a".
_________________
Martin Prikryl
Marcel7819
[View user's profile]

Joined: 2012-07-19
Posts: 2
Location: usa va
I understand that I can use the fingerprint, but the problem is that I have connect to 72 machines every hour and download 500 + files. but sometimes the machine get replaced and the fingerprint changes, that why i need to use a certificate the machine are configured to accept the certificate.

Do you know why i can connect to the machine via winscp.com with the certificate but i can can't connect to the machine using the .NET Assembly and the certificate.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Marcel7819 wrote:
but sometimes the machine get replaced and the fingerprint changes, that why i need to use a certificate the machine are configured to accept the certificate.

I do not think that using client-certificate makes difference. Still you need to verify the server-certificate.

Quote:
Do you know why i can connect to the machine via winscp.com with the certificate but i can can't connect to the machine using the .NET Assembly and the certificate.

The winscp.com caches accepted server-certificates. You have probably accepted the certificate before. But when the certificate changes, you still have to accept it manually.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License