---
title: "What is the appSettings section in the web.config file?"  
description: "What is the appSettings section in the web.config file?"  
author: "Shikhar Arora"  
published: 2019-12-07  
canonical: https://answers.mindstick.com/qa/92565/what-is-the-appsettings-section-in-the-web-config-file  
category: "technology"  
tags: [".net programming"]  
reading_time: 1 minute  

---

# What is the appSettings section in the web.config file?

What is the [appSettings](https://www.mindstick.com/forum/2093/configurationmanager-appsettings-convert-n-to-n-why) [section](https://yourviews.mindstick.com/view/84187/why-i-have-really-enjoyed-posting-our-thoughts-on-yourviews-section-of-mindstick) in the [web.config](https://www.mindstick.com/interview/1394/what-is-appsetting-section-in-web-config-file) [file](https://www.mindstick.com/articles/59/encrypting-and-decrypting-files-using-c-sharp)

## Answers

### Answer by Shrikant Mishra

## AppSettings section in the Web.config file

Web.config file defines configuration for a webproject.

AppSetting section is used to set the user defined values.

For e.g.: The ConnectionString which is used through out the project for database connection.

```
<configuration>
<appSettings><BR><addkey="ConnectionString"value="server=xyz;pwd=www;database=testing" />
</appSettings>
```

And Other is -

The AppSetting section in the configuration file is a section that allows us to keep configurable and application wide settings (For example : ConnectionString) that an application requires in order to perform the tasks properly. This helps in easy maintenance and deployment of the application.

### Web.confg:

```
<appsettings>
    <add key="ConnectionString" value="(your connection string)" />
</appsettings>
```

Code behind:

```
string strConnection = ConfigurationSettings.AppSettings["ConnectionString"];
```


---

Original Source: https://answers.mindstick.com/qa/92565/what-is-the-appsettings-section-in-the-web-config-file

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
