質問

こう。私はファイルを開くにFTPに存在する使用WebClient.ファイルが存在するとこの機能は、過去にもその例外がスローされます。(システム。います。WebException:しかし、リモートサーバに返されるエラー:(550)ファイル(例えば、ファイルが見つかりません、アクセス).).面白いのは、スクリプトが開き、ファイルという本イベントは終了いたしました。す。自由来のものはこのような態度を取るのか。

WebClient downloadRequest = new WebClient();
downloadRequest.Credentials = new NetworkCredential(pusername, ppassword);
byte[] downloadBytes = downloadRequest.DownloadData(purl);

こちらはスタックトレース:

[WebException: The remote server returned an error: (550) File unavailable (e.g., file not found, no access).]
System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request) +287
System.Net.WebClient.DownloadData(Uri address) +106
System.Net.WebClient.DownloadData(String address) +29
ftp_connect.copyFile(String purl, String pusername, String ppassword, String pubordev) in d:\wwwdev\test\ftp\ftpconnect.aspx.cs:112
ftp_connect.copyFolder(String purl, String pusername, String ppassword, String pubordev) in d:\wwwdev\test\ftp\ftpconnect.aspx.cs:160
ftp_connect.Page_Load(Object sender, EventArgs e) in d:\wwwdev\test\ftp\ftpconnect.aspx.cs:93
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
役に立ちましたか?

解決 4

ここでは私を呼び出する機能という機能したという。

なので、溶かした、スタックです。すべきことです。

他のヒント

そのファイルがあるから、前回に成功す。

のスクリプトがバージョンを使用してファイルの保存場合、ユーザーのウェブリクエストした在も活躍しております。

(粉を山にして真ん中のファイルはあなたのユーザーによるその他のクライアント/ユーザーです。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top