Understanding the Web Configuration File - Part 1
page 3 of 6
by Steven Swafford
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 58631/ 48

Web Configuration File Breakdown

[ Download Code ]

I suggest that you take the time to read more on ASP.NET Settings Schema as time permits. This will provide a greater insight into the possibilities of application configuration within .NET.

The root element of every Web configuration file is <configuration>. Within the <configuration> element you may have a total of nineteen possible child elements, which I will further discuss and provide code samples.

Table 1: System.Web Web Configuration File Child Elements

ELEMENT

DESCRIPTION

<authentication>

Configures ASP.NET authentication support. This element can be declared only at the machine, site, or application level. Any attempt to declare it in a configuration file at the subdirectory or page level will result in a parser error message.

<authorization>

Configures ASP.NET authorization support. The <authorization> tag controls client access to URL resources. This element can be declared at any level (machine, site, application, subdirectory, or page).

<browserCaps>

Controls the settings of the browser capabilities component. The <browserCaps> element can be declared at the machine, site, application, and subdirectory level. The <browserCaps> element can be updated as required to detect future browsers and browser capabilities.

<clientTarget>

Adds aliases for specific user agents to an internal collection of user agent aliases.

<compilation>

Configures all the compilation settings that ASP.NET uses.

<customErrors>

Provides information about custom error messages for an ASP.NET application.

<globalization>

Configures the globalization settings of an application.

<httpHandlers>

Maps incoming requests to the appropriate IHttpHandler or IHttpHandlerFactory class, according to the URL and the HTTP verb specified in the request.

<httpModules>

Configures the HTTP modules within an application.

<httpRuntime>

Configures ASP.NET HTTP runtime settings. This section can be declared at the machine, site, application, and subdirectory levels.

<identity>

Controls the application identity of the Web application. This element can be declared at any level (machine, site, application, subdirectory, or page).

<machineKey>

Configures keys to use for encryption and decryption of forms authentication cookie data and view state data, and for verification of out-of-process session state identification. This section can be declared at the machine, site, and application levels, but not at the subdirectory level.

<pages>

Identifies page-specific configuration settings. The <pages> section can be declared at the machine, site, application, and subdirectory levels.

<processModel>

Configures the ASP.NET process model settings on a Microsoft Internet Information Services (IIS) Web server. The <processModel> section can be set only within the Machine.config file and affects all ASP.NET applications running on the server.

<securityPolicy>

Defines valid mappings of named security levels to policy files. This section can be declared at the machine, site, and application levels. You can extend the security system by providing your own named <trustLevel> subtag mapped to a file specified by the policyFile attribute.

<sessionState>

Configures session state settings for the current application.

<trace>

Configures the ASP.NET trace service.

<trust>

Configures the code access security level applied to an application. The <trust> section can be declared at the machine, site, and application levels.

<webServices>

Controls the settings of XML Web services created using ASP.NET.


View Entire Article

User Comments

No comments posted yet.






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


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-04-19 8:11:01 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search