今天又一次郁闷了,看Orchard真实学到不少东西哇!
Web.Config里面appSettings节点原来可以直接引用一个文件,以前还老想着微软真二,配置节点多了肿么办?
本质上来说,每一个可执行文件的配置文件包含如下所示的一个入口:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings file="settings.config">
</appSettings>
</configuration>
where "settings.config" is a custom config file which looks something like this:
其中"settings.config"是一个用户配置文件,内容如下所示:
<appSettings>
<add key="Setting1" value="This is Setting 1 from settings.config" />
<add key="Setting2" value="This is Setting 2 from settings.config" />
<add key="ConnectionString" value="ConnectString from settings.confg" />
</appSettings>
时间: 2024-10-28 05:59:30