Hi
I'm connecting to an FTP server which works 90% of the time but every now and again i'm receiving the following error.
[ERROR] 2017-01-18 15:00:13,674 – An error occured during the Connect event with an Exception message A call to SSPI failed, see inner exception. and stacktrace at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception)
inner exception System.ComponentModel.Win32Exception (0x80004005): The buffers supplied to a function was too small
this error occurs on the client.AuthTLS() line any help would be appreciated
public Ftp Connect(Entities.FtpAccount ftpAccount, FtpProtocol ftpProtocol)
{
Ftp client = new Ftp();
try
{
client.Connect(ftpAccount.Url);
client.Mode = FtpMode.Passive;
switch (ftpProtocol)
{
case FtpProtocol.Ftp:
break;
case FtpProtocol.Ftps:
client.ServerCertificateValidate += ValidateCertificate;
client.AuthTLS();
break;
default:
break;
}
client.Login(ftpAccount.Username, ftpAccount.Password);
return client;
}
catch (FtpException ftpe)
{
log.ErrorFormat($"An error occured during the Connect event");
return client = null;
throw;
}
catch (Exception e)
{
log.ErrorFormat($"An error occured during the Connect event");
return client = null;
throw;
}
}