组属性列表:
objectClass
cn
member
distinguishedName
instanceType
whenCreated
whenChanged
uSNCreated
memberOf
uSNChanged
name
objectGUID
objectSid
sAMAccountName
sAMAccountType
groupType
objectCategory
nTSecurityDescriptor
用户成员属性列表:
objectClass
cn
sn
distinguishedName
instanceType
whenCreated
whenChanged
displayName
uSNCreated
memberOf
uSNChanged
name
objectGUID
userAccountControl
badPwdCount
codePage
countryCode
badPasswordTime
lastLogoff
lastLogon
pwdLastSet
primaryGroupID
objectSid
accountExpires
logonCount
sAMAccountName
sAMAccountType
userPrincipalName
objectCategory
dSCorePropagationData
nTSecurityDescriptor
这些属性所包含的具体设置参数:
除了以下的项:
AnonymousUserName
AnonymousUserPass
AccessRead
AccessExecute
AccessWrite
AuthBasic
AuthNTLM
ContentIndexed
EnableDefaultDoc
EnableDirBrowsing
AccessSSL
AccessScript
DefaultDoc
Path
这一段代码,列出所有属性,自已慢慢研究
- //注意网站 与 虚拟目录的属性不一样的 path不同
- DirectoryEntry dir = new DirectoryEntry( "IIS://localhost/w3svc ");
- foreach (string elmentName in dir.Properties.PropertyNames)
- {
- PropertyValueCollection valueCollection = dir.Properties[elmentName];
- for (int i = 0; i < valueCollection.Count; i++)
- {
- this.Response.Write(elmentName + "[ " + i.ToString() + "] = " + valueCollection[i].ToString() + " <br/> ");
- }
- }
============================================================
- using System;
- using System.Data;
- using System.Configuration;
- using System.Collections;
- using System.Web;
- using System.Web.Security;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Web.UI.WebControls.WebParts;
- using System.Web.UI.HtmlControls;
- using System.DirectoryServices;
- public partial class _Default : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- //注意网站 与 虚拟目录的属性不一样的 path不同
- DirectoryEntry dir = new DirectoryEntry("IIS://localhost/w3svc");
- foreach (string elmentName in dir.Properties.PropertyNames)
- {
- PropertyValueCollection valueCollection = dir.Properties[elmentName];
- for (int i = 0; i < valueCollection.Count; i++)
- {
- this.Response.Write(elmentName + "[" + i.ToString() + "] =" + valueCollection[i].ToString() + "<br/>");
- }
- }
- }
- }
AllowKeepAlive[0] =True
AppAllowClientDebug[0] =False
AppAllowDebugging[0] =False
AspAllowOutOfProcComponents[0] =True
AspAllowSessionState[0] =True
AspAppServiceFlags[0] =0
AspBufferingLimit[0] =4194304
AspBufferingOn[0] =True
AspCalcLineNumber[0] =True
AspCodepage[0] =0
AspEnableApplicationRestart[0] =True
AspEnableAspHtmlFallback[0] =False
AspEnableChunkedEncoding[0] =True
AspEnableParentPaths[0] =True
AspEnableTypelibCache[0] =True
AspErrorsToNTLog[0] =False
AspExceptionCatchEnable[0] =True
AspExecuteInMTA[0] =0
AspKeepSessionIDSecure[0] =0
AspLCID[0] =2048
AspLogErrorRequests[0] =True
AspMaxDiskTemplateCacheFiles[0] =2000
AspMaxRequestEntityAllowed[0] =204800
AspProcessorThreadMax[0] =25
AspQueueConnectionTestTime[0] =3
AspQueueTimeout[0] =-1
AspRequestQueueMax[0] =3000
AspRunOnEndAnonymously[0] =True
AspScriptEngineCacheMax[0] =250
AspScriptErrorSentToBrowser[0] =True
AspScriptFileCacheSize[0] =500
AspScriptTimeout[0] =90
AspSessionMax[0] =-1
AspSessionTimeout[0] =20
AspTrackThreadingModel[0] =False
AuthFlags[0] =5
CacheISAPI[0] =True
CentralBinaryLoggingEnabled[0] =False
CGITimeout[0] =300
ConnectionTimeout[0] =120
ContentIndexed[0] =True
DirBrowseFlags[0] =1073741886
DownlevelAdminInstance[0] =1
IIs5IsolationModeEnabled[0] =False
LogExtFileFlags[0] =2199503
LogFilePeriod[0] =1
LogFileTruncateSize[0] =20971520
LogInUTF8[0] =False
LogType[0] =1
MaxConnections[0] =-1
MaxGlobalBandwidth[0] =-1
MinFileBytesPerSec[0] =240
PasswordChangeFlags[0] =6
AnonymousUserName[0] =IUSR_WENWEIFENG
AnonymousUserPass[0] =;d/Y)f5((+20(?
AppPoolId[0] =DefaultAppPool
AspScriptErrorMessage[0] =处理 URL 时服务器出错。请与系统管理员联系。[Page]
AspScriptLanguage[0] =VBScript
AuthChangeURL[0] =/iisadmpwd/achg.asp
AuthExpiredUnsecureURL[0] =/iisadmpwd/aexp3.asp
AuthExpiredURL[0] =/iisadmpwd/aexp.asp
AuthNotifyPwdExpUnsecureURL[0] =/iisadmpwd/anot3.asp
AuthNotifyPwdExpURL[0] =/iisadmpwd/anot.asp
DefaultDoc[0] =Default.aspx,index.aspx,Default.htm,Default.asp,index.htm
KeyType[0] =IIsWebService
LogOdbcDataSource[0] =HTTPLOG
LogOdbcPassword[0] =sqllog
LogOdbcTableName[0] =InternetLog
LogOdbcUserName[0] =InternetAdmin
LogPluginClsid[0] ={FF160663-DE82-11CF-BC0A-00AA006111E0}
WAMUserName[0] =IWAM_WENWEIFENG
WAMUserPass[0] =xX!k63t5\67J(7
AspDiskTemplateCacheDirectory[0] =%windir%\system32\inetsrv\ASP Compiled Templates
LogFileDirectory[0] =C:\WINDOWS\system32\LogFiles
ApplicationDependencies[0] =Active Server Pages;ASP
ApplicationDependencies[1] =Internet 数据连接器;HTTPODBC
ApplicationDependencies[2] =在服务器端的包含文件;SSINC
ApplicationDependencies[3] =WebDAV;WEBDAV
ApplicationDependencies[4] =ASP.NET v2.0.50727;ASP.NET v2.0.50727
HttpCustomHeaders[0] =X-Powered-By: ASP.NET
HttpErrors[0] =400,*,FILE,C:\WINDOWS\help\iisHelp\common\400.htm
HttpErrors[1] =401,1,FILE,C:\WINDOWS\help\iisHelp\common\401-1.htm
HttpErrors[2] =401,2,FILE,C:\WINDOWS\help\iisHelp\common\401-2.htm
HttpErrors[3] =401,3,FILE,C:\WINDOWS\help\iisHelp\common\401-3.htm
HttpErrors[4] =401,4,FILE,C:\WINDOWS\help\iisHelp\common\401-4.htm
HttpErrors[5] =401,5,FILE,C:\WINDOWS\help\iisHelp\common\401-5.htm
HttpErrors[6] =401,7,FILE,C:\WINDOWS\help\iisHelp\common\401-1.htm
HttpErrors[7] =403,1,FILE,C:\WINDOWS\help\iisHelp\common\403-1.htm
HttpErrors[8] =403,2,FILE,C:\WINDOWS\help\iisHelp\common\403-2.htm
HttpErrors[9] =403,3,FILE,C:\WINDOWS\help\iisHelp\common\403-3.htm
HttpErrors[10] =403,4,FILE,C:\WINDOWS\help\iisHelp\common\403-4.htm
HttpErrors[11] =403,5,FILE,C:\WINDOWS\help\iisHelp\common\403-5.htm
HttpErrors[12] =403,6,FILE,C:\WINDOWS\help\iisHelp\common\403-6.htm
HttpErrors[13] =403,7,FILE,C:\WINDOWS\help\iisHelp\common\403-7.htm
HttpErrors[14] =403,8,FILE,C:\WINDOWS\help\iisHelp\common\403-8.htm
HttpErrors[15] =403,9,FILE,C:\WINDOWS\help\iisHelp\common\403-9.htm
HttpErrors[16] =403,10,FILE,C:\WINDOWS\help\iisHelp\common\403-10.htm
HttpErrors[17] =403,11,FILE,C:\WINDOWS\help\iisHelp\common\403-11.htm
HttpErrors[18] =403,12,FILE,C:\WINDOWS\help\iisHelp\common\403-12.htm
HttpErrors[19] =403,13,FILE,C:\WINDOWS\help\iisHelp\common\403-13.htm
HttpErrors[20] =403,15,FILE,C:\WINDOWS\help\iisHelp\common\403-15.htm
HttpErrors[21] =403,16,FILE,C:\WINDOWS\help\iisHelp\common\403-16.htm
HttpErrors[22] =403,17,FILE,C:\WINDOWS\help\iisHelp\common\403-17.htm[Page]
HttpErrors[23] =403,18,FILE,C:\WINDOWS\help\iisHelp\common\403.htm
HttpErrors[24] =403,19,FILE,C:\WINDOWS\help\iisHelp\common\403.htm
HttpErrors[25] =403,20,FILE,C:\WINDOWS\help\iisHelp\common\403-20.htm
HttpErrors[26] =404,*,FILE,C:\WINDOWS\help\iisHelp\common\404b.htm
HttpErrors[27] =404,2,FILE,C:\WINDOWS\help\iisHelp\common\404b.htm
HttpErrors[28] =404,3,FILE,C:\WINDOWS\help\iisHelp\common\404b.htm
HttpErrors[29] =405,*,FILE,C:\WINDOWS\help\iisHelp\common\405.htm
HttpErrors[30] =406,*,FILE,C:\WINDOWS\help\iisHelp\common\406.htm
HttpErrors[31] =407,*,FILE,C:\WINDOWS\help\iisHelp\common\407.htm
HttpErrors[32] =412,*,FILE,C:\WINDOWS\help\iisHelp\common\412.htm
HttpErrors[33] =414,*,FILE,C:\WINDOWS\help\iisHelp\common\414.htm
HttpErrors[34] =415,*,FILE,C:\WINDOWS\help\iisHelp\common\415.htm
HttpErrors[35] =500,12,FILE,C:\WINDOWS\help\iisHelp\common\500-12.htm
HttpErrors[36] =500,13,FILE,C:\WINDOWS\help\iisHelp\common\500-13.htm
HttpErrors[37] =500,15,FILE,C:\WINDOWS\help\iisHelp\common\500-15.htm
HttpErrors[38] =500,16,FILE,C:\WINDOWS\help\iisHelp\common\500.htm
HttpErrors[39] =500,17,FILE,C:\WINDOWS\help\iisHelp\common\500.htm
HttpErrors[40] =500,18,FILE,C:\WINDOWS\help\iisHelp\common\500.htm
HttpErrors[41] =500,19,FILE,C:\WINDOWS\help\iisHelp\common\500.htm
InProcessIsapiApps[0] =C:\WINDOWS\system32\inetsrv\httpext.dll
InProcessIsapiApps[1] =C:\WINDOWS\system32\inetsrv\httpodbc.dll
InProcessIsapiApps[2] =C:\WINDOWS\system32\inetsrv\ssinc.dll
InProcessIsapiApps[3] =C:\WINDOWS\system32\msw3prt.dll
InProcessIsapiApps[4] =C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll
ScriptMaps[0] =.ad,C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll,5,GET,HEAD,POST,DEBUG
ScriptMaps[1] =.adprototype,C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll,5,GET,HEAD,POST,DEBUG
ScriptMaps[2] =.asa,C:\WINDOWS\system32\inetsrv\asp.dll,5,GET,HEAD,POST,TRACE
ScriptMaps[3] =.asax,C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll,5,GET,HEAD,POST,DEBUG
ScriptMaps[4] =.ascx,C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll,5,GET,HEAD,POST,DEBUG
ScriptMaps[5] =.ashx,C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG
ScriptMaps[6] =.asmx,C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG
ScriptMaps[7] =.asp,C:\WINDOWS\system32\inetsrv\asp.dll,5,GET,HEAD,POST,TRACE
ScriptMaps[8] =.aspx,C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG
ScriptMaps[9] =.axd,C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG[Page]
ScriptMaps[10] =.browser,C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll,5,GET,HEAD,POST,DEBUG
ScriptMaps[11] =.cd,C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll,5,GET,HEAD,POST,DEBUG
ScriptMaps[12] =.cdx,C:\WINDOWS\system32\inetsrv\asp.dll,5,GET,HEAD,POST,TRACE
ScriptMaps[13] =.cer,C:\WINDOWS\system32\inetsrv\asp.dll,5,GET,HEAD,POST,TRACE
ScriptMaps[14] =.compiled,C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll,5,GET,HEAD,POST,DEBUG
ScriptMaps[15] =.config,C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll,5,GET,HEAD,POST,DEBUG
ScriptMaps[16] =.cs,C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll,5,GET,HEAD,POST,DEBUG
ScriptMaps[17] =.csproj,C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll,5,GET,HEAD,POST,DEBUG
ScriptMaps[18] =.dd,C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll,5,GET,HEAD,POST,DEBUG
ScriptMaps[19] =.exclude,C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll,5,GET,HEAD,POST,DEBUG
ScriptMaps[20] =.idc,C:\WINDOWS\system32\inetsrv\httpodbc.dll,5,GET,POST
ScriptMaps[21] =.java,C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll,5,GET,HEAD,POST,DEBUG
ScriptMaps[22] =.jsl,C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll,5,GET,HEAD,POST,DEBUG
ScriptMaps[23] =.ldb,C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll,5,GET,HEAD,POST,DEBUG
ScriptMaps[24] =.ldd,C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll,5,GET,HEAD,POST,DEBUG