---
title: "What are the Web config Files in ASP.NET?"  
description: "In this article, we'll learn about the Web config files are and what things we can manage by this config files"  
author: "Anonymous User"  
published: 2021-07-06  
updated: 2021-07-06  
canonical: https://www.mindstick.com/articles/327225/what-are-the-web-config-files-in-asp-dot-net  
category: "asp.net"  
tags: ["asp.net", "web config"]  
reading_time: 2 minutes  

---

# What are the Web config Files in ASP.NET?

The **Web config** files are the [configuration files](https://www.mindstick.com/forum/155709/what-are-the-different-types-of-configuration-files) in your website that manage the various settings in your [web application](https://www.mindstick.com/interview/1126/does-silverlight-web-application-work-with-all-browsers).

These settings are generally stored in form of XML and these settings are separate from your web application code. From this way, you can easily update your web settings on your XML file. Generally, a website contains a single web.config file but if [your application](https://answers.mindstick.com/qa/97584/how-do-you-choose-the-correct-camera-for-your-application) requires a different settings for your different directory then you can easily add according to your need in all directories.

Why [Configuration File](https://www.mindstick.com/forum/155707/what-is-the-usage-of-asp-dot-net-configuration-file)?

Configuration file in the website describe the properties & behaviour of your Web Application. These files manage many settings related to your website. The web configuration are the XML files with the extension of .config. These are the normal text files which can be edited by any of the editors like Notepad, VS code Sublime etc. and they are in the readable forms for the Developer.

## Benefits of XML Configuration Files-

1.) Web config [Files in ASP.NET](https://www.mindstick.com/interview/34140/what-is-the-use-of-the-program-cs-and-startup-cs-files-in-asp-dot-net-core) are used to store the specific information of websites and retrieve them easily. These are in a human readable form.

2.) If you have made any changes, it does not require restart of the server. These changes will automatically reflect after saving your file on the system.

3.) You can use any text editor or XML parser to create or edit the ASP.NET Configuration files.

## Settings in Web.config files-

There are the number of Web.config settings which we [define while](https://www.mindstick.com/forum/155714/define-while-loop) developing an application:

1.) [Database Connection](https://answers.mindstick.com/qa/93693/what-is-connection-string-in-database-connection) are the most common settings in the Configuration Files.

2.) [Error Handling](https://www.mindstick.com/articles/1825/objective-c-error-handling) while any HTTP Client Server error occur or while REQUESTED PAGE NOT FOUND error has occur these help the user to handle all the inappropriate request.

3.) [Session State](https://www.mindstick.com/articles/42/session-state-in-asp-dot-net) in the application for storing the value which were used in entire page of the application.

4.) Caching Settings are the one of the most important setting to speed up your [web applications](https://www.mindstick.com/blog/11464/improve-your-understanding-of-web-applications). They are used to store the code snippets. So that the website can load faster.

## Types of Configuration files-

Machine.config - Server or machine-wide configuration file

Web.config - Application configuration files which deal with a single application

---

Original Source: https://www.mindstick.com/articles/327225/what-are-the-web-config-files-in-asp-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
