一个网站的配置文件,你可以在里面写些系统配置信息,也可以是网站的定义信息。
下面给个数据库连接信息的配置。
<appSettings>
<add key="CopyrightMessage" value="Copyright (c) Total Training, 2006" />
<add key="ContactEmail" value="tt-info@totaltraining.com" />
<add key="CompanyName" value="Total Training" />
</appSettings>
下面给个数据库连接信息的配置。
<connectionStrings>
<add name="NorthwindConnection" connectionString="Data Source=localhost; Integrated Security=SSPI; Initial Catalog=Northwind;"/>
</connectionStrings>
<customErrors mode="On" defaultRedirect="MyGenericErrorPage.htm">
<error statusCode="403" redirect="MyNoAccess.htm" />
<error statusCode="404" redirect="MyFileNotFound.htm" />
</customErrors>