0

我正在使用 Visual Studio 和 Windows Phone 7 开发智能手机 FTP 客户端

我面临一些错误,例如

request.Method = WebRequestMethods.ftp.ListDirectory 错误 1 ​​'WebRequestMethods' 未声明。由于其保护级别,它可能无法访问。C:\Users\Zaheer\Documents\Visual Studio 2010\Projects\PhoneApp4\PhoneApp4\MainPage.xaml.vb 43 30 PhoneApp4

response = CType(request.GetWebResponse(), WebResponse) 错误 2 'GetWebResponse' 不是 'System.Net.WebRequest' 的成员。C:\Users\Zaheer\Documents\Visual Studio 2010\Projects\PhoneApp4\PhoneApp4\MainPage.xaml.vb 37 30 PhoneApp4

4

1 回答 1

0

WebRequestMethodsWebRequestMethods.Ftp看起来在 WP7 上不受支持。

至于GetWebResponse的错误,编译器是绝对正确的,WebRequest(甚至HttpWebRequest)没有GetWebResponse方法,也许你在找WebRequest.GetResponse?

于 2013-07-01T11:48:31.420 回答