Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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..

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


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

any idea on this issue.

Thanks,
Syed
Posted

1 solution

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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900