WebConfig 自定义节点configSections配置信息

示例:
<configuration>
  <configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    <section name="RedisConfig" type=" WebApplication11Redis2.Controllers.RedisConfigInfo, WebApplication11--Redis2"/>
  </configSections>
  <RedisConfig WriteServerList="127.0.0.1:6379" ReadServerList="127.0.0.1:6379" MaxWritePoolSize="60" MaxReadPoolSize="60" AutoStart="true" LocalCacheTime="180" RecordeLog="false"/> 

坑:
section 节点下 的type格式: Fully qualified class name , assembly file name , version , culture , public key token
                                                完全合格的类名称、          程序集文件名、          版本、   文化、    公共密钥
Fully qualified class  name:命名空间+类名
程序集文件名:DLL名字
注意:程序集如果有横杠,代码中被转换成下杠,但是DLL依旧是中杠




相关文章:

  • 2022-12-23
  • 2021-12-09
  • 2021-12-26
  • 2022-02-06
  • 2021-05-21
  • 2022-02-02
  • 2022-02-04
  • 2022-12-23
猜你喜欢
  • 2021-12-26
  • 2022-01-10
相关资源
相似解决方案