DirectoryEntry root = new DirectoryEntry(@"IIS://localhost/W3SVC");
string PInfo = "";
foreach (string elmentName in root.Properties.PropertyNames)
{
PropertyValueCollection valueCollection = root.Properties[elmentName];
for (int i = ; i < valueCollection.Count; i++)
{
PInfo += elmentName + "[ " + i.ToString() + "] = " + valueCollection[i].ToString() + "\r\n";
}
}

PInfo的结果是:

KeyType[ 0]   = IIsWebService
SslUseDsMapper[ 0]   = False
LogFileDirectory[ 0]   = C:\inetpub\logs\LogFiles
LogPluginClsid[ 0]   = {FF160663-DE82-11CF-BC0A-00AA006111E0}
AppPoolId[ 0]   = DefaultAppPool
IIs5IsolationModeEnabled[ 0]   = False
DontLog[ 0]   = False
DirBrowseFlags[ 0]   = 1073741854
DefaultDoc[ 0]   = Index.aspx,Default.htm,Default.asp,index.htm,index.html,iisstart.htm,default.aspx
AuthFlags[ 0]   = 1
AnonymousUserName[ 0]   = IUSR
AspDiskTemplateCacheDirectory[ 0]   = C:\inetpub\temp\ASP Compiled Templates
HttpErrors[ 0]   = 401,*,FILE,C:\inetpub\custerr\zh-CN\401.htm
HttpErrors[ 1]   = 403,*,FILE,C:\inetpub\custerr\zh-CN\403.htm
HttpErrors[ 2]   = 404,*,FILE,C:\inetpub\custerr\zh-CN\404.htm
HttpErrors[ 3]   = 405,*,FILE,C:\inetpub\custerr\zh-CN\405.htm
HttpErrors[ 4]   = 406,*,FILE,C:\inetpub\custerr\zh-CN\406.htm
HttpErrors[ 5]   = 412,*,FILE,C:\inetpub\custerr\zh-CN\412.htm
HttpErrors[ 6]   = 500,*,FILE,C:\inetpub\custerr\zh-CN\500.htm
HttpErrors[ 7]   = 501,*,FILE,C:\inetpub\custerr\zh-CN\501.htm
HttpErrors[ 8]   = 502,*,FILE,C:\inetpub\custerr\zh-CN\502.htm
SSIExecDisable[ 0]   = False
AccessSSLFlags[ 0]   = 0
NTAuthenticationProviders[ 0]   = Negotiate,NTLM
WebSvcExtRestrictionList[ 0]   = 0,*.exe
WebSvcExtRestrictionList[ 1]   = 0,*.dll
WebSvcExtRestrictionList[ 2]   = 1,C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll,1,ASP.NET v4.0.30319,ASP.NET v4.0.30319
WebSvcExtRestrictionList[ 3]   = 1,C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll,1,ASP.NET v4.0.30319,ASP.NET v4.0.30319
WebSvcExtRestrictionList[ 4]   = 1,C:\Windows\system32\inetsrv\asp.dll,1,ASP,Active Server Pages
WebSvcExtRestrictionList[ 5]   = 1,C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\isapi\_vti_aut\author.dll,1,Windows SharePoint Services V3,Windows SharePoint Services V3
WebSvcExtRestrictionList[ 6]   = 1,C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\isapi\_vti_adm\admin.dll,1,Windows SharePoint Services V3,Windows SharePoint Services V3
WebSvcExtRestrictionList[ 7]   = 1,C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\isapi\shtml.dll,1,Windows SharePoint Services V3,Windows SharePoint Services V3
WebSvcExtRestrictionList[ 8]   = 1,C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\isapi\owssvr.dll,1,Windows SharePoint Services V3,Windows SharePoint Services V3
WebSvcExtRestrictionList[ 9]   = 1,C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll,1,ASP.NET v2.0.50727,ASP.NET v2.0.50727
AccessFlags[ 0]   = 513
ScriptMaps[ 0]   = .rules,C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll,1
ScriptMaps[ 1]   = .xoml,C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll,1
ScriptMaps[ 2]   = .asp,C:\Windows\system32\inetsrv\asp.dll,5,GET,HEAD,POST
ScriptMaps[ 3]   = .cer,C:\Windows\system32\inetsrv\asp.dll,5,GET,HEAD,POST
ScriptMaps[ 4]   = .axd,C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG
ScriptMaps[ 5]   = .aspx,C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG
ScriptMaps[ 6]   = .rules,C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll,1
ScriptMaps[ 7]   = .xoml,C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll,1
ScriptMaps[ 8]   = .ashx,C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG
ScriptMaps[ 9]   = .asmx,C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG
ScriptMaps[ 10]   = .rem,C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG
ScriptMaps[ 11]   = .soap,C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG
ScriptMaps[ 12]   = .svc,C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll,1
ScriptMaps[ 13]   = .xamlx,C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG
ScriptMaps[ 14]   = .aspq,C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG
ScriptMaps[ 15]   = .cshtm,C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG
ScriptMaps[ 16]   = .cshtml,C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG
ScriptMaps[ 17]   = .vbhtm,C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG
ScriptMaps[ 18]   = .vbhtml,C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG
ScriptMaps[ 19]   = .axd,C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG
ScriptMaps[ 20]   = .aspx,C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG
ScriptMaps[ 21]   = .rules,C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll,1
ScriptMaps[ 22]   = .xoml,C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll,1
ScriptMaps[ 23]   = .ashx,C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG
ScriptMaps[ 24]   = .asmx,C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG
ScriptMaps[ 25]   = .rem,C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG
ScriptMaps[ 26]   = .soap,C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG
ScriptMaps[ 27]   = .svc,C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll,1
ScriptMaps[ 28]   = .xamlx,C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG
ScriptMaps[ 29]   = .aspq,C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG
ScriptMaps[ 30]   = .cshtm,C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG
ScriptMaps[ 31]   = .cshtml,C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG
ScriptMaps[ 32]   = .vbhtm,C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG
ScriptMaps[ 33]   = .vbhtml,C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG
ScriptMaps[ 34]   = .svc,C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll,1
ScriptMaps[ 35]   = .axd,C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG
ScriptMaps[ 36]   = .aspx,C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG
ScriptMaps[ 37]   = .ashx,C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG
ScriptMaps[ 38]   = .asmx,C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG
ScriptMaps[ 39]   = .rem,C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG
ScriptMaps[ 40]   = .soap,C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG
ScriptMaps[ 41]   = .stm,C:\Windows\system32\inetsrv\ssinc.dll,5,GET,POST
ScriptMaps[ 42]   = .shtm,C:\Windows\system32\inetsrv\ssinc.dll,5,GET,POST
ScriptMaps[ 43]   = .shtml,C:\Windows\system32\inetsrv\ssinc.dll,5,GET,POST
ScriptMaps[ 44]   = .,C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG
ScriptMaps[ 45]   = .,C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG
ApplicationDependencies[ 0]   = Active Server Pages;ASP
DoDynamicCompression[ 0]   = True
HttpCustomHeaders[ 0]   = X-Powered-By: ASP.NET

DirectoryEntry_Properties属性的遍历(win2008)的更多相关文章

  1. DirectoryEntry_Properties属性的遍历(win2003)

    DirectoryEntry root = new DirectoryEntry(@"IIS://localhost/W3SVC"); string PInfo = "& ...

  2. [转] JavaScript中的属性:如何遍历属性

    在JavaScript中,遍历一个对象的属性往往没有在其他语言中遍历一个哈希(有些语言称为字典)的键那么简单.这主要有两个方面的原因:一个是,JavaScript中的对象通常都处在某个原型链中,它会从 ...

  3. 【转载】JavaScript中的属性:如何遍历属性

    转载自:http://www.cnblogs.com/ziyunfei/archive/2012/11/03/2752905.html 在JavaScript中,遍历一个对象的属性往往没有在其他语言中 ...

  4. JavaScript中对象的属性:如何遍历属性

    for/in 语句循环遍历对象的属性. js中获取key得到某对象中相对应的value的方法:obj.key js中根据动态key得到某对象中相对应的value的方法有二: 一.var key = & ...

  5. VAD树结构体的属性以及遍历

    Windows内核分析索引目录:https://www.cnblogs.com/onetrainee/p/11675224.html VAD树的属性以及遍历 前面学习过的PFNDATABSAE是管理物 ...

  6. js 属性的遍历

    引自:http://es6.ruanyifeng.com/#docs/object 属性的遍历 ES6 一共有5种方法可以遍历对象的属性. (1)for...in for...in循环遍历对象自身的和 ...

  7. Iterator遍历器 调用Symbol.Iterator属性,遍历器对象。

    Iterator实现原理 创建一个指针对象,指向当前数据结构的起始位置.也就是说,遍历器对象本质上,就是一个指针对象. 第一次调用指针对象的next方法,可以将指针指向数据结构的第一个成员. 第二次调 ...

  8. JavaScript 对象属性的遍历

    ES6一共有5种方法可以遍历对象的属性. (1)for...in for...in循环遍历对象自身的和继承的可枚举属性(不含Symbol属性). (2)Object.keys(obj) Object. ...

  9. js解析多层嵌套的json,取出所有父元素属性和遍历所有子元素

    已知一个多层嵌套的json,取出所有父元素和子元素的id值 思路:因为不知道到底嵌套了多少层,递归有可能造成栈溢出.查询时间特别久的问题 所以先查询一次,判断是否有子节点,如果有,取出子节点并到父节点 ...

随机推荐

  1. Kafka--基础知识

  2. Nginx HTTPS功能部署实践

    本文出处:http://oldboy.blog.51cto.com/2561410/1889346 30.1 文档目的 本文目的提高自己文档的写作能力及排版能力,加强上课所讲的内容得以锻炼也方便自己以 ...

  3. vSphere虚拟化管理平台的功能

    VMware vSphere® 提供全球领先的虚拟化平台,用于构建云计算基础架构. vSphere 有哪些功能 强大的计算能力 虚拟化 x86 服务器资源并将其聚合成逻辑池,用于分配多个工作负载. 网 ...

  4. 舌尖上的javascript数组和字符串基本操作

    Javascript数组基本操作 Javascript中的数组是一种特殊的对象,用来表示偏移量的索引是该对象的属性,索引可能是整数,然而这些数字索引在内部被转换为字符串类型,这是因为javascrip ...

  5. C++之C++的词法单位

    C++的字符集 ASCII码字符集是计算机中的常用字符集.它包括英文字母及阿拉伯数字等128个字符,存储一个ASCII码占用一个字节单元. 由于汉字处理的需要,又出现了汉字国标码等对应于不同语言的字符 ...

  6. php中经常使用的string函数

    strpos() ---返回字符串在另一字符串中首次出现的位置 strrpos() ---查找字符串在另一字符串中最后出现的位置 strchr()   ===  strstr()    ---找到字符 ...

  7. 第13章 GPIO—位带操作

    第13章     GPIO—位带操作 全套200集视频教程和1000页PDF教程请到秉火论坛下载:www.firebbs.cn 野火视频教程优酷观看网址:http://i.youku.com/fire ...

  8. 开启Node.js的大门

    其实也没什么好说的,简而言之,就是如何配置node.js环境,然后进行开发.博主最近比较堕落,觉得什么事情也没有就不知道想干什么,想融入一些事情又觉得没大神指引,于是自娱自乐开始自己玩node.js, ...

  9. day 11 前方高能-迭代器

    第一类对象 -----函数名  == 变量名 函数对象可以像变量一样进行赋值 还可以作为列表的元素进行使用 可以作为返回值返回 def wrapper():     def inner():      ...

  10. Android开发——JobScheduler机制

    年Google开发大会上指出,如果每个APP都使用这个API,那么可以节约15%到20%的电量. 2.  JobScheduler拥有更多的触发选项 JobScheduler比AlarmManager ...