configuration 元素是公共语言运行库和 .NET Framework 应用程序所使用的每个配置文件中均需要的根元素。
每个配置文件必须恰好包含一个 configuration 元素。

默认配置
下面的代码示例演示一个可以为任意 ASP.NET 应用程序创建的基本 Web.config 文件。customErrors 节在需要的时候提供,但被注释掉。
<?xml version="1.0"?>
<configuration
xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<appSettings/>
<connectionStrings/>
<system.web>
<compilation debug="false"/>
<authentication mode="Windows"/>
<!--
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm"/>
<error statusCode="404" redirect="FileNotFound.htm"/>
</customErrors>
-->
</system.web>
</configuration>