我有.NET程序,它从特定邮箱ID获取附件并处理附件文件。
问题是我们在Windows服务器上启用了TLS 1.2并禁用了所有旧版本。从那时起,我们在尝试通过.NET程序与Exchange服务器通信时遇到以下错误。
ErrorMessage:Exchange error: The request failed. The underlying connection was closed: An unexpected error occurred on a receive.
InnerExceptionSystem.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.ComponentModel.Win32Exception: The client and server cannot communicate, because they do not possess a common algorithm
下面是我程序中的文件:
Microsoft.Exchange.WebServices.Auth.dll
Microsoft.Exchange.WebServices.Auth.pdb
Microsoft.Exchange.WebServices.Auth.xml
Microsoft.Exchange.WebServices.dll
Microsoft.Exchange.WebServices.pdb
Microsoft.Exchange.WebServices.xml
请告诉我如何更改代码以解决此问题。