Partager via


What's New in ASP.NET Configuration 

ASP.NET version 2.0 includes a configuration management system that provides new tools and interfaces as well as expanded configuration settings. New administration tools and a new API for configuration management allow you to create and change configuration settings without directly editing raw XML data.

The following sections in this topic briefly describe what is new in the ASP.NET 2.0 configuration management system:

  • ASP.NET MMC Snap-in

  • Web Site Administration Tool

  • Configuration API

  • New Configuration Settings

  • Viewing the Configuration Schema and Default Settings

  • Browser Capabilities

ASP.NET MMC Snap-in

The Microsoft Management Console (MMC) snap-in for ASP.NET provides a graphical user interface (GUI) for manipulating ASP.NET configuration settings at the global, Web site, and application levels on the local computer. The tool prevents you from making invalid settings, allows you to control whether settings can be inherited by Web applications, and helps you manage the dependencies between levels of the configuration hierarchy.

The ASP.NET MMC snap-in is integrated with the Internet Information Services (IIS) Manager snap-in, making it easy to work with IIS settings and ASP.NET configuration settings that apply to a Web site or application. The ASP.NET MMC snap-in appears as an ASP.NET tab on the property sheet of a virtual directory.

For more information about this snap-in, see ASP.NET MMC Snap-In.

Web Site Administration Tool

The Web Site Administration Tool allows you or anyone with administrative privileges for a Web site to use a Web browser to manage the ASP.NET application locally or remotely. Unlike the MMC snap-in, the Web Site Administration Tool allows you to delegate administrative tasks to anyone with privileges for a particular Web site, even though he or she might not have administrative privileges for the computer.

For ease of use, the Web Site Administration Tool includes a tabbed interface with tabs for Security, Profile, Application, and Provider.

For more information about this tool, see ASP.NET Web Site Administration Tool.

ASP.NET Configuration API

A new ASP.NET management API allows you to read and write configuration settings as strongly typed managed code objects. You can work with any configuration file at any level of the configuration hierarchy, on the local computer or a remote computer.

Using the ASP.NET configuration API, you can write utilities that manage Web site and application configuration settings programmatically without directly editing the XML in the configuration files. You can also use the ASP.NET configuration API to automate deployment tasks, such as creating applications, creating configuration settings, and configuring multiple computers with the same script. Additionally, the ASP.NET configuration API allows the IIS management tools to integrate easily with the ASP.NET configuration system. The ASP.NET MMC snap-in and the Web Site Administration Tool help you manipulate configuration settings by using the ASP.NET configuration API.

For more information, see ASP.NET Configuration API.

New Configuration Settings

Many ASP.NET features require additions to the ASP.NET configuration schema. Some features require additions to existing sections, while other features require new sections. The following table describes the new configuration elements in ASP.NET 2.0. These schema additions are reflected in the new ASP.NET configuration API, the ASP.NET MMC snap-in, and when appropriate, the Web Site Administration Tool.

Feature Element/Type Purpose

Application settings

New section:

connectionStrings

Store connection information. Use this element to store connection strings instead of the appSettings element.

Caching

New sections:

caching

   cache

   outputCache

   outputCacheSettings

   sqlCacheDependency

Configure global cache settings for an ASP.NET application.

Code access security

New attribute in the trust element:

processRequestInApplicationTrust

Configure the level of code access security (CAS) that is applied to an application. Use this element if you want to run a Web application with less than Full trust.

Debugging

New attributes in the trace element:

mostRecent

writeToDiagnosticsTrace

Configure the ASP.NET code-tracing service that controls how trace results are gathered, stored, and displayed.

Deployment

New section:

deployment

Enable deployment of retail versions of your application, which disables certain configuration settings, such as trace output, custom errors, and debugging capabilities.

Dynamic compilation

New sub-tags and elements in the following sections:

compilation

pages

Extend dynamic compilation to include additional file types and eliminate the need for integrated development environment (IDE) compilation of Web application projects.

Encryption

New attribute in the machineKey elements:

decryption

Configure 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.

Forms authentication

New attributes of the forms sub-element in the authentication section:

cookieless

defaultURL

domain

enableCrossAppRedirects

Integrate desktop forms authorization and mobile device forms authorization, presenting a single image for developers.

Health monitoring

New section: healthMonitoring

   bufferModes

   eventMappings

   profiles

   providers

   rules

Enable and disable event types and flags; support logging, reporting, and notification.

Hosting environment

New section:

hostingEnvironment

Define configuration settings that control the behavior of the application hosting environment.

HTTP-only cookies

New section:

httpCookies

Enable and disable HTTP-only cookies.

Master pages and themes

New attributes in the following section:

pages

Enable attachment of content pages to a master page, and enable use of themes.

Mobile controls

New section:

deviceFilters

New behavior in existing section:

mobileControls

Enable customization of controls and pages for various devices by identifying supported devices (mobile or otherwise) in this section.

Role management

New section:

roleManager

Configure an application for role management.

Session

New section:

sessionPageState

Define the maximum number history files stored in session state. History files contain view-state data and work with the server-side Form control to persist control-state data.

Site navigation

New section:

urlMappings

Control the text in the address bar of the browser by mapping complicated URLs to user-friendly URLs.

Web Parts

New sections:

personalization

transformers

Enable personalization of Web pages. The modifications can be applied to all of the users on the site or to individual users.

Web Services

New sections:

conformanceWarnings

soapServerProtocolFactoryType

soapTransportImporterTypes

Specify the SOAP protocols and settings for XML Web services.

Web Site Administration Tool

New section:

webSiteAdministrationTool

Configure the Web Site Administration Tool.

XML rendering

New section:

xhtml11Conformance

Enable ASP.NET pages and controls to render markup that is compatible with the XHTML 1.1 Transitional standard.

Viewing the Configuration Schema and Default Settings

You can view the ASP.NET configuration schema by using the documentation in ASP.NET Configuration Settings, or you can view the Machine.config.comments and Web.config.comments files that are located in the %SystemRoot%\Microsoft .NET\Framework\versionNumber\CONFIG directory. These files are not used by the configuration system to configure applications, but they contain lists of default settings and useful comments.

Browser Capabilities

The browserCaps section has been deprecated in the .NET Framework version 2.0. For backward compatibility, the configuration settings in this section are still effective if they are set at the application level, but they are merged with the information that is contained in browser definition files (.browser), which are located in the %SystemRoot%\Microsoft.NET\Framework\versionNumber\CONFIG\Browsers directory and in any existing application-level App_Browser folders. For more information, see Browser Definition File Schema (browsers Element).

See Also

Concepts

ASP.NET Configuration Overview

Other Resources

ASP.NET MMC Snap-In
ASP.NET Configuration API
ASP.NET Web Site Administration Tool