.Net Web.Config Transformations,替换整个ConnectionString部分

.Net Web.Config Transformations,替换整个ConnectionString部分,第1张

概述我一直在使用web.config转换取得了很好的成功.我刚刚实现了连接字符串加密,并且不确定如何修改我的Release转换. 在此之前我只是使用定位器替换名称. 现在设置已加密,没有名称. <connectionStrings configProtectionProvider="Pkcs12Provider"><EncryptedData Type="http://www.w3.org/2001 我一直在使用web.config转换取得了很好的成功.我刚刚实现了连接字符串加密,并且不确定如何修改我的Release转换.

在此之前我只是使用定位器替换名称.

现在设置已加密,没有名称.

<connectionStrings configProtectionProvIDer="Pkcs12ProvIDer"><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#aes192-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>rsaKey</Keyname>      </KeyInfo>      <CipherData>        <CipherValue>CipherValueHere</CipherValue>      </CipherData>    </EncryptedKey>  </KeyInfo>  <CipherData>    <CipherValue>CipherValueHere</CipherValue>  </CipherData></EncryptedData>

如何更新我的转换以用此替换整个连接字符串部分?是否有元素名称“connectionStrings”的定位器?

非常感谢,
约翰

解决方法 要替换整个connectionString部分,请使用以下代码

<connectionStrings xdt:transform="Replace">

xdt:transform =“Replace”会做的伎俩.干杯!!

总结

以上是内存溢出为你收集整理的.Net Web.Config Transformations,替换整个ConnectionString部分全部内容,希望文章能够帮你解决.Net Web.Config Transformations,替换整个ConnectionString部分所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1067857.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-26
下一篇2022-05-26

发表评论

登录后才能评论

评论列表(0条)

    保存