2011-09-17 18 views
0

FtpWebRequest(ASP.NET/C#)経由でWindows Azureでデータをダウンロードすることはできますか?FtpWebRequest + Windows Azure =動作していませんか?

私は現在ありません私の問題は、予想通りFtpWebRequestは、一般的に動作していないということですか、私は別の障害が発生した場合...

はSBがある場合は必ずこれをやっています。前にこれをしましたか?

答えて

0

私はFTPLibでのftp-要求をやって私の問題を解決することができます。 これは、次のことを意味します。ファイルを紺や外部ソースにコピー/ロードすることができます。 :-)

0

AlexFTPSと同じようにするには、StartKeepAliveを追加する必要があります。

try 
    { 
     string fileName = Path.GetFileName(this.UrlString); 
     Uri uri = new Uri(this.UrlString); 

     string descFilePath = Path.Combine(this.DestDir, fileName); 

     using (FTPSClient client = new FTPSClient()) 
     { 
      // Connect to the server, with mandatory SSL/TLS 
      // encryption during authentication and 
      // optional encryption on the data channel 
      // (directory lists, file transfers) 
      client.Connect(uri.Host, 
          new NetworkCredential("anonymous", 
               "[email protected]"), 
               ESSLSupportMode.ClearText 
      ); 
      client.StartKeepAlive(); 
      // Download a file 
      client.GetFile(uri.PathAndQuery, descFilePath); 
      client.StopKeepAlive(); 
      client.Close(); 
     } 

    } 
    catch (Exception ex) 
    { 
     throw new Exception("Failed to download", ex); 
    } 
関連する問題