I finally managed to get the accounting software company to set up FTPS, however now I have the following problem, see test code below
var cmbs as new CURLSMBS
// s is a string parameter when calling the method with windowsansi encoding
var i as integer
if not DebugBuild then
var fwp as new XojoCloud.FirewallPort(990,xojocloud.FirewallPort.Direction.Outgoing)
fwp.open
if fwp.isopen then
// get following from Grunndata
cmbs.OptionURL=ftpaddress
cmbs.OptionUsername=ftpuser
cmbs.OptionPassword=ftppass
cmbs.SetInputData(s)
cmbs.OptionAppend=true
cmbs.OptionUpload=true
//cmbs.OptionLocalPortRange=2
cmbs.OptionPort=990
//cmbs.OptionTransferText=True
var i as integer =cmbs.Perform
if i <> 0 then
MsgBox (cmbs.DebugData+endofline)
return
end if
var bb as boolean
MsgBox (cmbs.DebugData)
else
end if
else
// get following from Grunndata
cmbs.OptionURL=ftpaddress
cmbs.OptionUsername=ftpuser
cmbs.OptionPassword=ftppass
cmbs.SetInputData(s)
cmbs.OptionAppend=true
cmbs.OptionUpload=true
cmbs.OptionTransferText=True
cmbs.OptionPort=990
i =cmbs.Perform
MsgBox (cmbs.DebugData)
var bb as boolean
end if
My problem is the OptionTransferText. If I use that on XojoCloud the app just shuts down.
I know the FTPS server accepts the data because it works when I debug locally - that is to say the data arrives and is written to the FTPS Server.
If I just send withoutthe option defined then the text arrives as UTF8 and their import routine requires windowsansiā¦ Note I do send as windowsansi
Christian,
Yes itās FTPS. As I said it runs fine locally on my developer machine.
Maybe a stupid question but where would I find a crash report on XojoCloud. All I get in the browser is
SFTP needs only one port.
FTPS needs two ports, one data and one command connection.
And you may need to use OptionFTPPort to tell the server what port you opened for data connection.
Christian,
thanks that seems to have done the trick.
I opened port 991 as well
set OptionFTPPort="-:990-991"
and so far everything works.
If ever I come back up to Koblenz Iāll make sure to bring another box of wine
Ok, I have opened 100 outgoing ports (65000 to 65100)
I get a connection on 990 and everything is fine until the following from the debuglog
220-Duett AS - File Spooler Central - duett.no
220 Only for authenticated users - please login
USER myuser
331 Password required
PASS mypassword
230-Welcome! At your service.
230 User logged in.
PBSZ 0
200 PBSZ command successful.
PROT P
200 PROT command successful.
PWD
257 ā/myuserā is current directory.
Entry path is ā/myuserā
Request has same path as previous transfer
EPRT |1|134.122.59.42|65000|
ftp_perform ends with SECONDARY: 1
200 EPRT command successful.
Connect data stream actively
TYPE A
200 Type set to A.
APPE testcloud.csv
150 Opening ASCII mode data connection.
Preparing for accepting server on data port
Checking for server connect
Data conn was not available immediately
Checking for server connect
Checking for server connect
Checking for server connect
Checking for server connect
Checking for server connect
Checking for server connect
Checking for server connect
Checking for server connect
Checking for server connect
Checking for server connect
Checking for server connect
Checking for server connect
Checking for server connect
Checking for server connect
Checking for server connect
Checking for server connect
Checking for server connect
Checking for server connect
Checking for server connect
Checking for server connect
Checking for server connect
Checking for server connect
Ctrl conn has data while waiting for data conn
550
Remembering we are in dir āā
Uploaded unaligned file size (0 out of 645 bytes)
Connection #0 to host ftp-folder.daldata.no left intact
Sorry Iām stumped!
Is the FTPS server expecting the incoming port to be open on 65000?
Christian,
If I could I would. I am not in control, itās my clientās accounting package company. I asked them to change their FTP to SFTP or FTPS. They finally changed to FTPS.
In that test I had it as outgoingā¦
I just tried it with incoming and I am pleased to say that, but very cautiously, it seems to have worked.
I need to give it a real good testing now.
Thanks for all the patience and help.