Understanding the Web Configuration File - Part 1
page 1 of 6
Published: 31 Mar 2005
Unedited - Community Contributed
Abstract
Many of the configuration settings for your ASP.NET application can be maintained in a distinct XML-based text file named Web.config. If you are familiar with XML then you will discover that this file is easy to follow and understand. Even if your experience with XML is limited, I believe you will find the Web.config a friendly configuration alternative.
by Steven Swafford
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 84498/ 197

Introduction

[ Download Code ]

This article will be completed in an ongoing multi-part series, one article per element, with the exception being the authorization and authentication elements which are covered together in this article.

Recommended Software

Prerequisite

This article is intended for the novice ASP.NET developer who may or may not be familiar with utilizing the Web Configuration file. The reader should have a basic understanding of the XML markup language, and be familiar with C# or VB.NET to follow the provided example code. All the screenshots and references to the IDE are of Visual Studio .NET.

Interesting Tid-Bits

  • A Web application can contain more than one Web.config file. The settings in a file apply to the directory in which it's located, and all child directories. Web.config files in child directories take precedence over the settings that are specified in parent directories.
  • Web.config files are protected by IIS, so your user cannot simply browse to them. If you try to retrieve an existing http://somedomain.com/Web.config file, an "Access denied" error message will be shown.
  • There's no need to restart the Web server after you modify a Web.config file. When a change occurs this is detected by ASP.NET on the next request, and the application is reloaded.

View Entire Article

User Comments

No comments posted yet.






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2017 ASPAlliance.com  |  Page Processed at 2017-06-28 4:42:44 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search