Tag: openvms

使用FtpWebRequest上传文件时获取“无效的URL”

我们有一个OpenVMS(VMS)Alpha服务器,我需要访问它才能通过FTP传输文件。 问题是它在启动连接时不支持FtpWebRequest使用的命令( ftp://192.168.xx.xx ),除了FtpWebRequest之外还有其他任何我可以使用的FTPfunction吗? 之前我一直在Windows和Unix环境中使用我的代码,但这是我第一次在VMS操作系统上执行此操作,我也可以使用命令提示符通过FTP访问服务器。 以下是我的代码: //Initializing ftp request ftp ftpClient = new ftp(@”ftp://192.168.xx.xx/”, “username”, “password”); MessageBox.Show((ftpClient.upload(“FILE.TAB”, @”C:\FILE.TAB”)).ToString()); public ftp(string hostIP, string userName, string password) { host = hostIP; user = userName; pass = password; } public string upload(string remoteFile, string localFile) { try { /* Create an FTP Request */ ftpRequest = (FtpWebRequest)FtpWebRequest.Create(host + […]