0

We are running a C# routine who retrieves emails from Exchange public folders. After migration from Exchange 2016 to 2019 we encounter a network problem:

System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. --->

The most curious part is, if the C# routine is called by our console test app (with or without debugging from VS) by a logged in user on that machine the access to Exchange via EWS works fine. If the routine is initiated by the continuously running WCF webservice on IIS10 the network error occurs.

Already tested: Upgrading Microsoft.Exchange.Webservices.dll to most recent version delivered with EXCHG2019. WCF webservice on IIS running under different user accounts (as local service, Domain Administrator, etc.).

Any idea? Thx.

devGeek
  • 59
  • 3
  • 8
  • Web services and HTTP in general have no connections. This refers to the TCP connection. Perhaps the server requires TLS1.2? Or access from your web service's machine is blocked by a firewall? – Panagiotis Kanavos Sep 16 '20 at 08:57
  • Panagiotis: Thanks for that hint but when called the same code from the same machine by the console app when a user is logged in no error occurs. So TLS might not be the issue... – devGeek Sep 16 '20 at 09:09

0 Answers0