无法将数据写入传输连接:已建立的连接已被主机中的软件中止。 [英] Unable to write data to the transport connection: An established connection was aborted by the software in your host machine.

查看:1744
本文介绍了无法将数据写入传输连接:已建立的连接已被主机中的软件中止。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我有一个用WPF / C#开发的工具,用于将大量文件从本地系统传输到网络位置。当我复制小号时文件一切正常。



但是当我转移大量文件如100以上时它会返回例外



无法将数据写入传输连接:已建立的连接已被主机中的软件中止。



i已添加以下内容web.config中的行以增加连接超时值,如下所示..



Hi All,

I have a tool developed in WPF/C# to transfer large number of files from local system to network location.when i copy small no of files everything works fine.

but when i transfer large number of files like above 100 it return with Exception

Unable to write data to the transport connection: An established connection was aborted by the software in your host machine.

i have added following lines in web.config to increase the connection time out value as follows..

<httpRuntime maxUrlLength="10999" maxQueryStringLength="2097151" executionTimeout="600" requestValidationMode="2.0" maxRequestLength="10485760" requestLengthDiskThreshold="10485760" />





在我的api上面添加web.cofig之后我也遇到了同样的问题。



关于这个问题的任何想法。



谢谢,

Syed



after adding above line web.cofig of my api also i am getting the same issue.

any idea on this issue.

Thanks,
Syed

推荐答案

这是一个样板错误消息,它来自Windows。底层错误代码是WSAECONNABORTED。这真的不仅仅意味着连接被中止。你必须要小心这句话的你的主机部分。在绝大多数Windows应用程序中,确实是桌面应用程序所连接的主机中断了连接。通常是其他地方的服务器。



但是当您实现自己的服务器时,角色会被颠倒。现在,您需要将错误消息读作由应用程序在另一个网络中止。当您实现服务器时,这当然并不罕见,使用您的服务器的客户端程序不会因任何原因中止连接。这可能意味着防火墙或代理终止了连接,但这不太可能,因为他们通常不会允许首先建立连接。



你真的不知道为什么连接被中止,除非你了解电线另一端发生了什么。那当然很难得到。如果您的服务器可以通过Internet访问,那么请不要忽视端口扫描程序探测您的可能性。或者你的客户,寻找游戏作弊。
That is a boiler-plate error message, it comes out of Windows. The underlying error code is WSAECONNABORTED. Which really doesn't mean more than "connection was aborted". You have to be a bit careful about the "your host machine" part of the phrase. In the vast majority of Windows application programs, it is indeed the host that the desktop app is connected to that aborted the connection. Usually a server somewhere else.

The roles are reversed however when you implement your own server. Now you need to read the error message as "aborted by the application at the other of the wire". Which is of course not uncommon when you implement a server, client programs that use your server are not unlikely to abort a connection for whatever reason. It can mean that a fire-wall or a proxy terminated the connection but that's not very likely since they typically would not allow the connection to be established in the first place.

You don't really know why a connection was aborted unless you have insight what is going on at the other end of the wire. That's of course hard to come by. If your server is reachable through the Internet then don't discount the possibility that you are being probed by a port scanner. Or your customers, looking for a game cheat.


这篇关于无法将数据写入传输连接:已建立的连接已被主机中的软件中止。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆