System.Configuration.ConfigurationErrorsException: 项“xxxx”已添加。配置文件获取Configuration异常问题

<connectionStrings>

       <clear />
<add name="Sql" connectionString="User ID=sa;Data Source=1.;Password=123456;Initial Catalog=TestDB;Pooling=true;Max Pool Size=512;Min Pool Size=5;Connect Timeout=180000"/>
</connectionStrings>

前面加上<clear/>节点即可

posted @ 2021-06-10 14:06  博客萌新  阅读(925)  评论(0编辑  收藏  举报