Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/256.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C#将文件上载到Filezilla服务器(XAMPP)错误:无法在传输连接上写入数据_C# - Fatal编程技术网

C#将文件上载到Filezilla服务器(XAMPP)错误:无法在传输连接上写入数据

C#将文件上载到Filezilla服务器(XAMPP)错误:无法在传输连接上写入数据,c#,C#,我正在尝试使用FTP将一个文件上传到我的服务器(我用xampp构建了它,所以它有Apache和FileZilla服务器) 一个C#应用程序可以正常工作几个小时,然后我遇到这个异常,应用程序停止上传文件 (我将保持连接的活动状态。代码经过调试并保持一致。我使用xampp在其他机器上进行了一些测试,并遇到了相同的问题。) 这是返回的消息: System.Net.WebException: Eccezione durante una richiesta WebClient. ---> Syste

我正在尝试使用FTP将一个文件上传到我的服务器(我用xampp构建了它,所以它有Apache和FileZilla服务器)

一个C#应用程序可以正常工作几个小时,然后我遇到这个异常,应用程序停止上传文件

(我将保持连接的活动状态。代码经过调试并保持一致。我使用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)

能否将语言设置更改为英语并重新生成错误?此演练还建议检查异常的某些属性: