Web. config is of course used to configure websites. Many things can be set here.
The following is a brief introduction.
Web. config is an xml document (now more and more popular with xml for configuration files). The root element is configuration and then contains a system. at the third level, the web node sets various web pages for the site. there are a lot of labels that can be set in config, so we will give a brief introduction and you can check the labels when using them.
Custom settings in the web system I often use it to save some of the database's connection data and read it easily.
Browser settings, such as whether to allow Java Applet...
Compilation Method
Customize the flag pointed to when an error occurs. This prevents exposure of important messages.
Defines the global settings of the site, mostly related to Syntax
The http module set for the site allows the system to define its own, which is used in url rewrite.
Set the cookie Encryption Method Wow, the way apsx works is too much.
Session Processing Method
This setting is used when webservice is used.
Example of appSettings
<Deleetask>
<Add Key = "dsn" Value = "server = localhost; uid = sa; database = northwind"/>
</AppSettings>
In this case, you can use string oDSN = ConfigurationSettings. etettings ["dsn"]; to represent the connection string.