The web.config file contains information about Server side configuration like Connection String, Application details, Caching information, Authentication Information. You can also define the user roles and profile in Web.config file.
For storing connection string
The web.config file contains information that control module loading, security configuration, session state configuration, and application language and compilation settings. Web.config files can also contain application specific items such as database connection strings.
The web.config file contains information that control module loading. security configuration and application language and compilation setting.web.config files can also contain application specific items such as Data base connection strings.