0

Error: System.IO.IOException: Unable to read data from the transport connection: An established connection was aborted by the software in your host machine. ---> System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)

I have a connection that works, works, works ... and then error. Then works, works and then error .. Can't find any pattern... the mails retrieved are small so it can't be a resurce problem.

I have a nother that alwayes work..

I use port: 993 and SSL

Where do I look to solve the problem ??

OleFolkersen
  • 31
  • 1
  • 1
  • 2

1 Answers1

0

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

This is a generic Windows socket error that simply means that the connection between the client and the remote host was disconnected for some reason.

This could be caused by any number of reasons, such as (but not limited to):

  1. The remote host was rebooted
  2. The remote host lost power (electricity went out)
  3. The IMAP/POP3/SMTP server software crashed
  4. The IMAP/POP3/SMTP server software disconnected your client because it was idle for too long
  5. A router between the client and the server was restarted
  6. A network cable was unplugged or (accidentally) cut somewhere between the client and server

on and on the list goes...

You are just experiencing the joys of network programming. Network connections are not 100% reliable as they can be dropped at random times for all manner of reasons.

All you can do as a programmer is catch these exceptions and attempt to reconnect and make the same request again.

That's all you can do.

jstedfast
  • 35,744
  • 5
  • 97
  • 110