Do you avoid using duplicate connection string in web.config?

Last updated by Brook Jeynes [SSW] 9 months ago.See history

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 - Using duplicate connection string in web.config

We open source. Powered by GitHub