The remotePath
parameter of the PutFile method is not expected to be in the full URI format (starting with "ftp://servername...").
Try to construct ftpfullpath just with the following value:
string ftpfullpath = String.Format("//'{0}'", MainframeName);
or:
string ftpfullpath = String.Format("//{0}", MainframeName);
or only:
string ftpfullpath = String.Format("{0}", MainframeName);