error: 234 SSL enabled start the negotiation
I'm trying to send a file via FTPS. I'm a mid-level VB programmer but I've not dealt with FTPS or SSL before.
Code:
Dim thereConnectionString As String = "ftp://" & thereHost & "/%2F/" & therePath & "/" & hereFileName
Try
Dim clsRequest As System.Net.FtpWebRequest = DirectCast(System.Net.WebRequest.Create(thereConnectionString), System.Net.FtpWebRequest)
clsRequest.Credentials = myURLInfo.Credentials
clsRequest.Method = System.Net.WebRequestMethods.Ftp.UploadFile
clsRequest.EnableSsl = True
' read in file...
Dim bFile() As Byte = System.IO.File.ReadAllBytes(hereFilePathName)
' upload file...
Dim clsStream As System.IO.Stream = clsRequest.GetRequestStream()
clsStream.Write(bFile, 0, bFile.Length)
clsStream.Close()
clsStream.Dispose()
The GetRequestStream is throwing the exception:
The remote server returned an error: 234 SSL enabled start the negotiation.
Any help would be greatly appreciated.
Re: error: 234 SSL enabled start the negotiation