1

我正在尝试使用 FTP 将文件上传到我的服务器(我使用 xampp 构建了它,因此它具有 Apache 和 FileZilla 服务器)。

AC# 应用程序运行良好几个小时然后我得到这个异常并且应用程序停止上传文件。

(我保持连接有效。代码已调试且一致。我在其他机器上使用 xampp 进行了一些测试并遇到了同样的问题。)

这是返回的消息:

System.Net.WebException: Eccezione durante una richiesta WebClient. ---> System.IO.IOException: Impossibile scrivere dati sulla connessione di trasporto: Connessione in corso interrotta forzatamente dall'host remoto. ---> System.Net.Sockets.SocketException: Connessione in corso interrotta forzatamente dall'host remoto
in System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
in System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
--- Fine dell'analisi dello stack dell'eccezione interna ---
in System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
in System.Net.FtpDataStream.Write(Byte[] buffer, Int32 offset, Int32 size)
in System.Net.WebClient.UploadBitsState.WriteBytes()
in System.Net.WebClient.UploadBits(WebRequest request, Stream readStream, Byte[] buffer, Byte[] header, Byte[] footer, CompletionDelegate completionDelegate, AsyncOperation asyncOp)
in System.Net.WebClient.UploadFile(Uri address, String method, String fileName)
--- Fine dell'analisi dello stack dell'eccezione interna ---
in System.Net.WebClient.UploadFile(Uri address, String method, String fileName)
4

0 回答 0