Bug 25491 - SqlConnection : Encrypt not implemented
Summary: SqlConnection : Encrypt not implemented
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Data ()
Version: 3.8.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2014-12-18 06:23 UTC by developer
Modified: 2018-02-23 08:20 UTC (History)
11 users (show)

Tags: sqlclient, encrypt, ssl
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description developer 2014-12-18 06:23:00 UTC
Using the SqlClient namespace I'm not able to connect to a sql server which uses encrypted transportation.

Setting the flag Encrypt to true in the connection string results in an NotImplementedException
"SSL encryption for data sent between client and server is not implemented."

For example this is needed to directly connect to an azure database which enforces the use of encryption.

The API documentation shows the right usage which nevertheless result in the exception.

There was a patch available 7 years ago which claims that it will fix this issue:

It would be great if this feature will be available in the future. The use of SqlClient requires the Xamarin business license and should implement encryption for sql connections.
Comment 1 Donald Hughes 2014-12-27 17:22:59 UTC
I wanted to add another voice requesting this feature.  This is, literally, the only feature that prevents me from using Mono on a Mac.  The only two database servers I need to connect to both require encrypted connections (an on-premise server and an Azure server).
Comment 2 Nate McMaster 2015-06-16 14:44:04 UTC
Ping. What is the status on this bug? Any progress or changes?
Comment 3 marcok 2016-01-19 06:52:44 UTC
I'm also hitting this bug:
- On Windows + Visual studio, everything works fine
- On OSX + Xamarin Studio I'm getting an Exception:
(System.NotImplementedException: SSL encryption for data sent between client and server is not implemented.​)
- On Xamarin Test Cloud I'm getting an even broader Exception:

I'm hitting this bug because we want to make a secure connection with an Azure SQL Database.
Comment 4 Erwin 2016-03-26 13:50:01 UTC
Really important issue, needs high priority.
Comment 5 Abhi 2016-11-19 16:10:21 UTC
+1 - With the new Visual Studio Mac Preview released, only thing stopping me from switching over to my Mac is this encryption bug. Any updates on possible fix to this?
Comment 6 Erwin 2016-11-20 12:26:51 UTC
There is this NuGet package available: https://www.nuget.org/packages/System.Data.SqlClient/

Which really is what you need, i'm not sure if it works under Mono, but it definitely should work under .NET Core. If you're not familiar with .NET Core then i suggest you take a look at that, it's cross platform and actively being developed.
Comment 7 halter456 2017-08-30 20:17:31 UTC
Guys look, if Xamarin is going to continue to use Mono then this is a seriously critical feature to not have implemented. It prevents EF Core from connecting to ANY Azure databases.
Comment 8 Marek Safar 2018-02-22 22:36:11 UTC
Mono 5.10 has significantly improved System.Data implementation which should resolve this issue. If you can still reproduce it please reopen the issue.
Comment 9 developer 2018-02-23 08:20:27 UTC

Tested in 5.8 and 5.10
Works in 5.10 => Yeah!