Skip to Content
Programming Visual Basic .NET
book

Programming Visual Basic .NET

by Dave Grundgeiger
December 2001
Beginner
464 pages
13h 51m
English
O'Reilly Media, Inc.
Content preview from Programming Visual Basic .NET

Configuration

System and application configuration is managed by XML files with a .config extension. Configuration files exist at both the machine and application level. There is a single machine-level configuration file, located at runtime_install_path \CONFIG\machine.config. For example, C:\WINNT\Microsoft.NET\Framework\v1.0.2914\CONFIG\machine.config. Application-configuration files are optional. When they exist, they reside in the application’s root folder and are named application_file_name .config. For example, myApplication.exe.config. Web application-configuration files are always named web.config. They can exist in the web application’s root folder and in subfolders of the application. Settings in subfolders’ configuration files apply only to pages retrieved from the same folder and its child folders and override settings from configuration files in higher-level folders.

Configuration files should be used for all application-configuration information; the Windows Registry should no longer be used for application settings.

Configuration File Format

Configuration files are XML documents, where the root element is <configuration> . For example:

<?xml version="1.0" encoding="UTF-8"?>

<configuration>
   <!-- More stuff goes in here. -->
</configuration>

To be as flexible as possible, .NET configuration files use a scheme in which the application developer can decide on the names of the subelements within the <configuration> element. This is done using the <configSections> ,

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming Visual Basic .NET, Second Edition

Programming Visual Basic .NET, Second Edition

Jesse Liberty

Publisher Resources

ISBN: 0596000936Supplemental ContentCatalog PageErrata