Troubleshoot SSL/TLS errors by disabling .NET troubleshooting tools

Logging is the immense tool for troubleshooting of .NET apps, especially when it comes to debugging network-related code. However, it turns out that sometimes these troubleshooting tools can be the root of the problem!

A client reported that they experience the strange [NotSupportedException: The certificate key algorithm is not supported.] exception when connecting to GMail’s IMAP over SSL with our MailBee.NET Objects email library. First thought was that TLS 1.2 was not in place (it’s required by Google) but further testing showed that this wasn’t true.

With extra research, we found that the client’s app had System.Diagnostics logging enabled for network connections. Normally tracing network connections with System.Diagnostics helps detect and eliminate various network issues but this time it caused the issue itself. Removing <system.diagnostics> section from app.config or web.config fixed this error.

Troubleshoot SSL/TLS errors by disabling .NET troubleshooting tools

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s