SecurityProtocol 显示 SMTP 客户端的所有 TLS 版本,但服务器未启用 TLS 协议

发布于 2025-01-18 06:32:51 字数 633 浏览 3 评论 0原文

我正在使用Office365 smtpclient发送电子邮件。在服务器计算机上,我找不到与启用TLS相关或添加的任何设置。我通过PowerShell命令[Net.ServicePointManager] :: SecurityProtocol进行了检查,并且只能看到SSL和TLS。无TLS 1.2或TLS 1.1协议。

我的API包含SMTPCLIENT代码。因此,每当我想发送电子邮件时,我都会触发一个API调用,而邮件是拍摄的。

我通过在API的日志中打印System.net.net.servicepointmanager.securityprotocol的值,并显示所有TLS协议版本(例如TLS,TLS1.1,TLS1.2)。

最近,我在数据库服务器没有启用TLS 1.2的数据库服务器上遇到了一个问题,因此未能发送电子邮件。我进行了这些设置,现在正常工作。

我只想找到我的应用程序使用TLS 1.2协议是否使用。我在这里有些困惑,因为 根据我的理解,如果服务器没有TLS设置,那么SecurityProtocol将不会在日志中显示TLS版本。

我检查了服务器注册表,即使我通过PS脚本进行了检查,但也没有运气。

你能帮我吗?我想知道,如果我们没有用于TLS协议的注册表设置,那么SecurityProcol如何显示TLS版本?

提前致谢。

I am using Office365 SMTPClient to send emails. On the Server machine, I did not find any settings related to TLS enabled or added. I checked through PowerShell command [Net.ServicePointManager]::SecurityProtocol and can see SSL and TLS only. No TLS 1.2 or TLS 1.1 protocol.

My API contains SMTPClient code. So whenever I want to send an email, I just triggered an API call and the mail is shoot.

I checked the value of System.Net.ServicePointManager.SecurityProtocol by printing it in the log of API and it is showing all TLS protocol versions like TLS, TLS1.1,TLS1.2.

Recently,I faced an issue with DB Mail where the database server doesn't have TLS 1.2 enabled so emails were failing to be delivered. I made those settings and it is working fine now.

I just want to find my application is using TLS 1.2 protocol or not.Therefore I checked by printing SecurityProtocol and I find all TLS version. I am little bit confused here because
as per my understanding if the server dont have TLS settings then SecurityProtocol would not show TLS version in log.

I checked the server registry and did not find any TLS related DWORDS even I checked through PS script but no luck.

Can you help me here? I want to know is it possible if we don't have registry settings for TLS protocol then how SecurityProcol is showing TLS version?

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

红颜悴 2025-01-25 06:32:51

根据我的理解,ServicePointManager 采用默认的操作系统协议。因为我使用的是 dotnet 4.6.1 框架。如果注册表不包含 TLS 密钥,则意味着服务器上默认启用 TLS,并且 dotnet 4.6.1 可以启用此 TLS。

As per my understanding ServicePointManager taking the default operating system protocol.Since I am using dotnet 4.6.1 framework. If the registry does not contain keys for TLS then it meant that TLS is by default enabled on the server and dotnet 4.6.1 can this TLS.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文