zoukankan      html  css  js  c++  java
  • WebConfig 自定义节点configSections配置信息

    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依旧是中杠




    作者:RushPasser
             
    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
  • 相关阅读:
    轻松背后的N+疲惫——系统日志
    Wcf实现IServiceBehavior拓展机制
    一个迭代小算法,根据指定的个数对下标进行分组
    SqlServer 游标用法
    DataView RowFilter
    Asp.net Repeater 排序
    asp.net 导出Excel
    C# 导出Excel(csv )
    C# 上传图片
    C# 调用外部.exe文件
  • 原文地址:https://www.cnblogs.com/RushPasser/p/5446607.html
Copyright © 2011-2022 走看看