尽管this page在标签中显示属性,当我尝试对其进行编码时,我在线下看到了可怕的蓝色波浪线,悬停消息就像我在这个问题的标题中输入的那样。我需要做什么才能激活此功能,因为 Microsoft 的页面清楚地表明它是通过这种方式完成的。
谢谢, 彼得
最佳答案
我认为 configProtectionProvider 属性仅在 .NET 2.0 中受支持。您可以通过添加以下内容来使用它
xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"
像这样到您的配置节点:
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<connectionStrings configProtectionProvider="RsaProtectedConfigurationProvider">
<EncryptedData Type="http://www.w3.org/2001/04/xmlenc#Element"
关于c# - VS2012 表示 ConnectionStrings 部分为 "The configProtectionProvider attribute is not allowed",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21339898/