I tried Retrieving a file from a mainframe location .. using FtpWebRequest.
Every thing is working fine with Other general Servers and Getting issue only for mainframe here is the message
550 Command RETR fails: /'XXX.XXX.XXX.XX.TXT' does not exist.\r\n
I believe the URI which I am creating its because of that , you can see a "/" in that message .
here is my URI = ftp ://data.data.com//'XXX.XXX.XXX.XX.TXT'
There has been a change made to the FtpWebRequest class from .Net 2.0/3.5 to .Net Framework 4 which was related to CWD protocol commands.which prevents to use CWD command before our actual requested command. so i forced FTPWebRequest class to behave like .net 2.0. Here is the solution to force FtpWebRequest to behave like .net 2.0/3.5 https://support.microsoft.com/en-us/kb/2134299
FTP to the mainframe is complicated. There are two parallel file systems that FTP has access to, one consisting of z/OS datasets, and the other consisting of the USS file system. My guess is that your FTP server is set up to show you the z/OS file system, and you need to first switch to the USS file system in order to retrieve what you want. I suspect that prefacing your get command with a 'cd ' command would fix things, or specifying the full path, including leading /, would as well.
Talk to your system programmer/read the CommServer documentation.