I was wondering what is the difference in having connection strings in 2 app settings and connectionstrings? Just wanted to know technically in Visual Studio 2008 for windows authentication!
<appSettings>
add key="ConnectionString" value="Server=198.57.2.70;Database=SalesTracking;Integrated Security=SSPI" />
</appSettings>
<connectionStrings>
<add name="ConnectionString" connectionString="DataSource=198.57.2.70;InitialCatalog=SalesTracking;IntegratedSecurity=True;" />
</connectionStrings>
Thanks!!
The difference is that the connectionString section gives you strongly typed access to your connection strings through the ConfigurationManager class. It's meant for connection strings specifically.
AppSettings is meant to store general settings. You can use it to store connection strings, but I recommend not doing that since there is a specific element for it in connectionStrings
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With