Rule #38
Do you avoid using duplicate connection string in web.config?
  v3.0 Posted at 20/10/2010 7:56 PM by system
Since we have many ways to use Connection String in .NET 2.0, it is probably that we are using duplicate connection string in web.config.
<connectionStrings>
<add name="ConnectionString" connectionString="Server=(local);
Database=NorthWind;" />
</connectionStrings>
<appSettings>
<add key="ConnectionString" value="Server=(local);Database=NorthWind;"/>
</appSettings>
Bad example - use duplicate connection string in web.config.
We have a program called SSW Code Auditor to check for this rule.
 


Related rules