的FtpWebRequest .NET 3.5 VS 4 [英] FTPWebRequest .NET 3.5 vs 4

查看:105
本文介绍了的FtpWebRequest .NET 3.5 VS 4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有,做一个FTP连接到IBM大型机应用程序以及所有一直工作正常。然后我重新编译在.NET 4和主机不再接受给我一个错误信息,说明无论是文件不存在的文件,或者我没有权限吧。

I have an application that does an FTP connection to an IBM mainframe and all has been working fine. I then recompiled against .NET 4 and the mainframe no longer accepts the file giving me an error message stating either the file doesn't exist, or I don't have permission for it.

这是我用什么来发送文件:

This is what I use to send the file:

Ftp = (FtpWebRequest)FtpWebRequest.Create(FtpAddress + "%2F'" + "EM.MOM.FIMSDATA" + ".AA." + "RR(+1)" + "'");

微软已经改变的.NET 3.5和4任何东西,因为它指向一个框架的变化?

Has Microsoft changed anything between .NET 3.5 and 4 because this points to a framework change?

推荐答案

我发现这对微软。

此问题的原因是由于在一个行为改变   .NET Framework中System.Net.FtpWebRequest 4级出现了   变化作出的.Net框架的System.Net.FtpWebRequest类   3.5到.NET Framework 4中,以简化使用CWD协议命令。新的实施System.Net.FtpWebRequest类   $ P $发行的实际前pvents额外的CWD命令发送   命令,该命令的用户请求,而是直接发送   请求的命令。对于完全符合RFC的FTP服务器,这应该   不再是一个问题,但是对于非完全符合RFC服务器,你会   看到这些类型的错误。

The cause of this issue is due to a behavior change in the System.Net.FtpWebRequest class in .Net Framework 4. There has been a change made to the System.Net.FtpWebRequest class from .Net Framework 3.5 to .Net Framework 4 to streamline the use of the CWD protocol commands. The new implementation of the System.Net.FtpWebRequest class prevents the send of extra CWD commands before issuing the actual command which the user requested and instead directly sends the requested command. For fully RFC compliant FTP servers, this should not be an issue, however for non-fully RFC compliant servers, you will see these types of errors.

解决方案是: http://support.microsoft.com/kb/2134299

这篇关于的FtpWebRequest .NET 3.5 VS 4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆