列出指定应用程序池的所有属性值
所属栏目:
winform
时间:2011-07-26 21:05
作者:狼子
列出指定应用程序池poolName的所有属性值
using (DirectoryEntry appPools = new DirectoryEntry("IIS://localhost/W3SVC/AppPools"))
{
foreach (DirectoryEntry appPool in appPools.Children)
{
if (appPool.Name.Equals(poolName))
{
foreach (string p in appPool.Properties.PropertyNames)
{
textBox1.Text += String.Format("{0} = {1},",
p,
appPool.Properties[p].Value.ToString());
}
}
}
}
所有属性项包括:
Win32Error
AppPoolState
KeyType
AppPoolIdentityType
AppPoolQueueLength
CPULimit
CPUResetInterval
DisallowOverlappingRotation
DisallowRotationOnConfigChange
IdleTimeout
LoadBalancerCapabilities
LogEventOnRecycle
MaxProcesses
OrphanWorkerProcess
PeriodicRestartMemory
PeriodicRestartPrivateMemory
PeriodicRestartRequests
PeriodicRestartTime
PingingEnabled
PingInterval
PingResponseTime
RapidFailProtection
RapidFailProtectionInterval
RapidFailProtectionMaxCrashes
ShutdownTimeLimit
SMPAffinitized
SMPProcessorAffinityMask
StartupTimeLimit
AdminACL
WAMUserName
WAMUserPass