.NET Framework 的配置文件架构Configuration file schema for the .NET Framework

配置文件是可用来更改应用设置并为其设置策略的标准 XML 文件。Configuration files are standard XML files that you can use to change settings and set policies for your apps. .NET Framework 配置架构由一些可在配置文件中用来控制应用行为的元素组成。The .NET Framework configuration schema consists of elements that you can use in configuration files to control the behavior of your apps. 本节的目录反映了架构的层次结构:启动、运行时、网络和其他配置设置类型。The table of contents for this section reflects the schema hierarchy for startup, runtime, network, and other types of configuration settings.

有关配置文件类型、格式和位置的信息,请参阅配置应用一文。For information about the types, format, and location of configuration files, see the article Configuring Apps. 若要直接编辑配置文件,需要自行熟悉 XML。Familiarize yourself with XML if you want to edit the configuration files directly.

重要

配置文件中的 XML 标记和特性区分大小写。XML tags and attributes in configuration files are case-sensitive.

本节内容In this section

<configuration> 元素描述 <configuration> 元素,它是所有配置文件的顶级元素。<configuration> Element Describes the <configuration> element, which is the top-level element for all configuration files.

<assemblyBinding> 元素指定配置级的程序集绑定策略。<assemblyBinding> Element Specifies assembly binding policy at the configuration level.

<linkedConfiguration> 元素指定要包含的配置文件。<linkedConfiguration> Element Specifies a configuration file to include.

启动设置架构描述指定要使用的公共语言运行时版本的元素。Startup Settings Schema Describes the elements that specify which version of the common language runtime to use.

运行时设置架构描述配置程序集绑定和运行时行为的元素。Runtime Settings Schema Describes the elements that configure assembly binding and runtime behavior.

网络设置架构描述指定 .NET Framework 如何连接到 Internet 的元素。Network Settings Schema Describes the elements that specify how the .NET Framework connects to the Internet.

加密设置架构描述将友好算法名映射到实现密码算法的类的元素。Cryptography Settings Schema Describes elements that map friendly algorithm names to classes that implement cryptography algorithms.

配置设置架构描述用于创建和使用自定义设置的配置节的元素。Configuration Sections Schema Describes the elements used to create and use configuration sections for custom settings.

跟踪和调试设置架构描述指定跟踪开关和侦听器的元素。Trace and Debug Settings Schema Describes the elements that specify trace switches and listeners.

编译器和语言提供程序设置架构描述指定可用语言提供程序的编译器配置的元素。Compiler and Language Provider Settings Schema Describes the elements that specify compiler configuration for available language providers.

应用程序设置架构描述允许 Windows 窗体或 ASP.NET 应用程序存储和检索应用程序范围设置和用户范围设置的元素。Application Settings Schema Describes the elements that enable a Windows Forms or ASP.NET application to store and retrieve application-scoped and user-scoped settings.

应用设置架构包含自定义应用程序设置,如文件路径、XML Web service URL 或应用程序的任何其他自定义配置信息。App Settings Schema Contains custom application settings, such as file paths, XML Web service URLs, or any other custom configuration information for an application.

Web 设置架构 Web 设置架构中的所有元素,包括用于配置 ASP.NET 如何与主机应用程序(如 IIS)一起工作的元素。Web Settings Schema All elements in the Web settings schema, which includes elements for configuring how ASP.NET works with a host application such as IIS. 在 Aspnet.config 文件中使用。Used in Aspnet.config files.

Windows 窗体配置架构 Windows 窗体应用程序配置节中的所有元素,包括多监视器和高 DPI 支持等自定义。Windows Forms Configuration Schema All elements in the Windows Forms application configuration section, which includes customizations such as multi-monitor and high DPI support.

WCF 配置架构用于配置 WCF 服务和客户端应用程序的所有元素。WCF Configuration Schema All elements that enable you to configure WCF service and client applications.

WCF 指令语法描述用于定义 .svc 编译器使用的特定于页的属性的 @ServiceHost 指令。WCF Directive Syntax Describes the @ServiceHost directive, which defines page-specific attributes used by the .svc compiler.

WIF 配置架构 Windows Identity Foundation (WIF) 配置架构的所有元素。WIF Configuration Schema All elements of the Windows Identity Foundation (WIF) configuration schema.

远程处理设置架构描述对实现远程处理的客户端和服务器应用程序进行配置的元素。Remoting Settings Schema Describes the elements that configure client and server applications that implement remoting.

ASP.NET 设置架构描述控制 ASP.NET Web 应用程序的行为的元素。ASP.NET Settings Schema Describes the elements that control the behavior of ASP.NET Web applications.

Web 服务设置架构描述控制 ASP.NET Web 服务及其客户端的行为的元素。Web Services Settings Schema Describes the elements that control the behavior of ASP.NET Web services and their clients.

配置 .NET Framework 应用描述如何在 .NET Framework 中配置安全性、程序集绑定和远程处理。Configuring .NET Framework Apps Describes how to configure security, assembly binding, and remoting in the .NET Framework.