使用.NET Core / EF Core的SQL Server 2016在ASP MVC应用中的列加密 [英] Column encryption in ASP MVC app with SQL Server 2016 using .net Core / EF Core
问题描述
我正在尝试使用SQL Server 2016中的始终加密功能来加密某些列。我使用了此帖子作为指导,将列设置为在SSDT中加密。
I am trying to use the "Always Encrypted" feature in SQL Server 2016 to encrypt some columns. I used this post as a guide to set the columns as encrypted in SSDT.
那部分很好,这是我尝试查询数据的时间从应用程序中我得到一个错误。根据文档,我需要添加以下内容:
That part goes fine, it's when I attempt to query the data from the application that I get an error. According to the docs I need to add this:
column encryption setting=enabled
到我的连接字符串。实体框架核心似乎不支持此功能。我收到此错误:
to my connection string. This does not appear to be supported in Entity Framework Core. I get this error:
不支持列加密设置=启用
column encryption setting=enabled is not supported
我尝试使用 SqlConnectionStringBuilder
来构建字符串,并且不存在添加该设置的功能。它确实存在于.NET 4.6中。
I tried using the SqlConnectionStringBuilder
to build the string as well and the ability to add that setting is not there. It does appear to be there in .NET 4.6.
因此,有人知道使用Always Encrypted从.NET Core应用程序连接到SQL Server实例的方法吗? ?
So, is anyone aware of a way to connect to an SQL server instance from a .NET Core application using Always Encrypted?
推荐答案
.Net Core当前始终不支持始终加密
Always Encrypted is currently not supported on .Net Core
您可以在此处
我们已经在路线图上添加了对.NET core的支持,我们尚无时间表
Adding Support for .NET core is on our roadmap, we do not have timeline for it yet
请遵循此github问题以获取更新
这篇关于使用.NET Core / EF Core的SQL Server 2016在ASP MVC应用中的列加密的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!