ASP.NET中Web.Config配置文件详解与应用
2015-12-18 15:23
966 查看
1.首先是Web.Config配置文件详解的参数含义(具体内容都在以下代码中有注释-我从网上找到的)
config.SectionGroups.Remove("group1"); //config.SectionGroups.Clear(); config.Save(ConfigurationSaveMode.Minimal); 删除ConfigurationSection config.Sections.Remove("add1"); //config.Sections.Clear(); if (config.SectionGroups["group1"] != null) { config.SectionGroups["group1"].Sections.Remove("add2"); //config.SectionGroups["group1"].Sections.Clear(); } config.Save(ConfigurationSaveMode.Minimal);
View Code
其他
可以使用 ConfigurationManager.OpenMachineConfiguration() 来操作 Machine.config 文件。或使用 System.Web.Configuration 名字空间中的 WebConfigurationManager 类来操作 ASP.net 配置文件。ConfigurationManager还提供了AppSettings、ConnectionStrings、GetSection()等便捷操作。
。。。。。。。。
相关文章推荐
- [转]asp.net解决高并发的方案.
- 我学ASP.Net---新手(分页显示)
- ASP.NET SingalR 点对点聊天实现思路总结
- iis 7 asp.net ajax post 请求字节过大报错问题解决办法
- [Python爬虫] 在Windows下安装PhantomJS和CasperJS及入门介绍(上)
- Asp.Net 、Css元素定位及元素显示控制总结
- ASP.NET5
- asp.net mvc 实现博客的时间分类管理
- ASP.NET内核几大对象、ASP.NET核心知识(7)--转载
- AspJpeg组件,按宽高比例,真正生成缩略图
- asp.net string有多行文字
- asp.net5中程序根目录的获取
- asp.net 获取当月的第一天和最后一天示例
- WAF 与 RASP 的安装使用大比拼!
- WAF 与 RASP 的安装使用大比拼!
- asp.net webform中的ext.net使用
- asp.net 判断用户是否使用微信浏览器
- asp.net 验证控件
- 关于Asp.net超时,延长读取sql server数据库的超时时间!(已解决)
- Asp.net管道模型(管线模型)之一发不可收拾