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.
The GetRequestStream is throwing the exception: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 remote server returned an error: 234 SSL enabled start the negotiation.
Any help would be greatly appreciated.


Reply With Quote