转载:http://www.cnblogs.com/gaoweipeng/archive/2009/05/17/1458762.html
Web.config配置文件详解(新手必看)
花了点时间整理了一下ASP.NET Web.config配置文件的基本使用方法。很适合新手参看,由于Web.config在使用很灵活,可以自定义一些节点。所以这里只介绍一些比较常用的节点。
<configuration>
<configSections>
<appSettings>
<connectionStrings>
<location path="Default.aspx" allowOverride="false">
<system.web>
<identity impersonate="false" />
<pages masterPageFile="Index" theme="Default" buffer="true" enableViewStateMac="true" validateRequest="false" enableViewState="false">
<customErrors defaultRedirect="Err.html" mode="RemoteOnly">
<trace enabled="true" localOnly="false" pageOutput="true" requestLimit="15" traceMode="SortByCategory"/>
<compilation debug="true" defaultLanguage="c#" batch="false">
<assemblies>
<buildProviders>
<authentication mode="Forms">
<authorization>
<globalization requestEncoding="gb2312" responseEncoding="gb2312" fileEncoding="gb2312" />
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20">
<httpRuntime appRequestQueueLimit="100" executionTimeout="80" maxRequestLength="40960" useFullyQualifiedRedirectUrl="false"/>
<httpModules>
<httpHandlers>
<httpCookies httpOnlyCookies="false" requireSSL="false"/>
<webServices>
<caching>
<system.net>
<mailSettings>
<defaultProxy>
<system.webServer>
<system.web.extensions>
<system.serviceModel>
<rewriter>
原创,转载请注明