Asp.net mvc 3 MVC 3的';configProtectionProvider';属性是不允许的

Asp.net mvc 3 MVC 3的';configProtectionProvider';属性是不允许的,asp.net-mvc-3,Asp.net Mvc 3,当我尝试使用标准RSA加密对MVC 3 web.config文件中的数据库连接字符串进行加密时,会收到以下错误消息: 不允许使用“configProtectionProvider”属性 关于如何在MVC3Web站点中加密数据库连接字符串有什么想法吗 代码示例 <connectionStrings configProtectionProvider="RsaProtectedConfigurationProvider"> <EncryptedData Type="http:

当我尝试使用标准RSA加密对MVC 3 web.config文件中的数据库连接字符串进行加密时,会收到以下错误消息:

不允许使用“configProtectionProvider”属性

关于如何在MVC3Web站点中加密数据库连接字符串有什么想法吗

代码示例

<connectionStrings configProtectionProvider="RsaProtectedConfigurationProvider">
    <EncryptedData Type="http://www.w3.org/2001/04/xmlenc#Element"
       xmlns="http://www.w3.org/2001/04/xmlenc#">
      <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc" />
      <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
        <EncryptedKey xmlns="http://www.w3.org/2001/04/xmlenc#">
          <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5" />
          <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
            <KeyName>
              RSA Key
            </KeyName>
          </KeyInfo>
          <CipherData>
            <CipherValue>
              WcFEbDX8VyLfAsVK8g6hZV....
            </CipherValue>
          </CipherData>
        </EncryptedKey>
      </KeyInfo>
      <CipherData>
        <CipherValue>
          OpWQgQ....
        </CipherValue>
      </CipherData>
    </EncryptedData>
  </connectionStrings>

RSA密钥
WcFEbDX8VyLfAsVK8g6hZV。。。。
OpWQgQ。。。。
节点中,添加:
xmlns=”http://schemas.microsoft.com/.NetConfiguration/v2.0“

您可能还需要
元素中,启动服务器