Home
Do you avoid using duplicate connection string in web.config?
  v3.0 Posted at 10/20/2010 7:56 PM by System Account
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

    Do you feel this rule needs an update?

    If you want to be notified when this rule is updated, please enter your email address:

    Comments:

    Note: Social Media login for Yotpo is not working in IE or Safari, please use Chrome. We are waiting for Yotpo to fix it.