您的位置:首页 > 产品设计 > UI/UE

c#代码获取web.config配置文件里面设置的 <compilation debug="true"节点的debug值

2017-09-01 10:08 1236 查看
下面代码可以获取掉debug的值
System.Web.Configuration.CompilationSection cmp = (System.Web.Configuration.CompilationSection)System.Configuration.ConfigurationManager.GetSection("system.web/compilation");
if (!cmp.Debug)
{
filterContext.ExceptionHandled = true;
}



这里有CompilationSection 类的介绍,微软官方的地址:

https://msdn.microsoft.com/zh-cn/library/system.web.configuration.compilationsection(v=vs.80).aspx

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐