type
--------------
必选的 String 属性。
指定用来执行如下操作的配置节处理程序类的名称:处理在 name 属性中指定的节或元素中的配置设置。使用以下格式:
type="完全限定类名, 程序集文件名, 版本, 区域性, 公钥标记"
定义必须匹配程序集引用。例如,如果下面的示例语法中的版本号与程序集不匹配,则会发生错误。
复制代码
type="MyConfigSectionHandler.MyHandler,MyCustomConfigurationHandler,Version=1.0.0.0,Culture=neutral,PublicKeyToken=null"
程序集文件必须与定义它的 Web.config 文件位于同一个应用程序目录中。对于根 Web.config 文件或 Machine.config 文件,程序集文件必须位于 %SystemRoot%\Microsoft.NET\Framework\版本目录中。
----------------------------
示例
<configuration> <configSections> <section name="sampleSection" type="System.Configuration.SingleTagSectionHandler" /> </configSections> <sampleSection setting1="Value1" setting2="value two" setting3="third value" /> </configuration>