I'm hoping someone here can help me out. I am trying to read the response from the ftp server after a PutFile command. If I try to simply read the response:
jobid = client.PutFile(localFileName, filename);
response = client.ReadResponse();
I get this error:
System.InvalidOperationException: No response from the server is expected.
Yet in the log fie there re two responses after the STOR command is sent.
Command: STOR ZENT001A.jcl
Response: 125 Accepting JCL to submit
Response: 250 It is known to JES as J0001904
Is there a way to read the raw ftp server response?
Here is the log file for the entire transaction.
2019-10-21 10:54:22.454 INFO Ftp(1)[15] Response: 230 User XXXXXX logged in. Working directory is "XXXXXX."
2019-10-21 10:54:22.459 INFO Ftp(1)[15] Command: FEAT
2019-10-21 10:54:22.498 INFO Ftp(1)[15] Response: 211-Extensions Supported
2019-10-21 10:54:22.498 INFO Ftp(1)[15] Response: AUTH TLS
2019-10-21 10:54:22.498 INFO Ftp(1)[15] Response: PBSZ
2019-10-21 10:54:22.498 INFO Ftp(1)[15] Response: PROT
2019-10-21 10:54:22.498 INFO Ftp(1)[15] Response: 211 End
2019-10-21 10:54:22.512 INFO Ftp(1)[15] Command: SITE filetype=jes
2019-10-21 10:54:22.548 INFO Ftp(1)[15] Response: 200 SITE command was accepted
2019-10-21 10:54:22.549 INFO Ftp(1)[15] Command: PASV
2019-10-21 10:54:22.585 INFO Ftp(1)[15] Response: 227 Entering Passive Mode (10,99,36,34,39,16)
2019-10-21 10:54:25.389 INFO Ftp(1)[15] Command: TYPE A
2019-10-21 10:54:25.425 INFO Ftp(1)[15] Response: 200 Representation type is Ascii NonPrint.
2019-10-21 10:54:25.427 INFO Ftp(1)[15] Command: PASV
2019-10-21 10:54:25.464 INFO Ftp(1)[15] Response: 227 Entering Passive Mode (10,99,36,34,39,16)
2019-10-21 10:54:25.506 INFO Ftp(1)[15] Command: STOR ZENT001A.jcl
2019-10-21 10:54:25.542 INFO Ftp(1)[15] Response: 125 Accepting JCL to submit
2019-10-21 10:54:26.085 INFO Ftp(1)[15] Response: 250 It is known to JES as J0001904
2019-10-21 10:54:32.442 ERROR Ftp(1)[15] Info: System.InvalidOperationException: No response from the server is expected.
Thanks.