Introduction:
In this article I will explain the differences between appsettings and connection strings in web.config using asp.net.
In this article I will explain the differences between appsettings and connection strings in web.config using asp.net.
Description:
In previous posts I explained Read or Write appsettings from
web.config,
Read/Write connection strings in
web.config.
Now I will explain differences between appsettings and connection strings in web.config using asp.net.
In many cases, we need to use some data string throughout the application simple example for this database connection string. Instead of writing the same connection string wherever required, it is easy to maintain if we store it in one place that is web.config file.
In web.config file we can store the connection strings in two ways those are appSettings and connectionStrings
AppSettings in web.config
The AppSettings section
in web.config is used to store connection strings, server names, file paths, and other
miscellaneous settings needed by an application. (Read More)
Connection String in web.config
The connection
string in web.config is a collection of database connection strings only.
Actually
in previous versions of ASP.NET all connection string values are storing in
appsettings only. In ASP.NET 2.0 + version new features has introduced such as
Session, Membership, Personalization, and Role Manager these will depend on
connection strings and stored in the connectionStrings element only. (Read More)
Difference
The
main difference is in appsettings
section we can store any data string values including database connection
strings also but in connectionStrings
section only database connection strings can store those are our application
connection strings and new features (Membership, Personalization and Role
Manager) connection strings only.
Instead
of this there is no much difference between appsettings and connectionStrings.
If you enjoyed this post, please support the blog below. It's FREE! Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email. |
|||
|
|||
12 comments :
thank u very much for posting on my reply......
Simple and good post...
Thanks
The ConnectionStrings factor identifies a selection of data source relationship post, as name/value couples, for ASP.NET programs and functions.In past variations of ASP.NET, relationship post were saved in the appSettings.
Thanks sir,this is very useful to .net beginners
thanks so much
Thanks a lot
I will go back and check out your way.
in this page readmore in appsettin and configsettins is redirect to same page that is configsettings only
Simple ga Manta putinchav anna
simple and superb....
Simple and easy to understand post
Note: Only a member of this blog may post a comment.