NET连接SQL数据库密码字符串包含&出现错误

<appSettings>
<add key = "DBConnectString" value="Server=localhost; Integrated Security=True;Database=TestDB;Persist Security Info=True;User ID=webuser;Password=#$143214142asdask#$%* "/>
</appSettings>  

出现N次错误.一直没有找到解决办法.去除密码字符串中的&字符后。可以进行调试.解决办法正在寻找

测试一:将密码字符串中&替换成&amp;不可以.

原文地址:https://www.cnblogs.com/xqf222/p/3306874.html