Advertise with us
Control Panel
Forum
Hosting Help
ASP.NET 4.5 & SQL 2012 Hosting
Resources
Notice
Login
Members
Shared Hosting
|
Upgrade
|
Advertise
|
Tutorials
|
Home
»
Resources
»
Enumering AppPools
ASP.NET
ADO.NET
Web Services
Remoting
Visual Studio 2005
Error Bank
Interview Questions
Tips & Tricks
XML
HTML
Jscript/Javascript
IIS
Windows
General
Submit Resource or code snippet
... and get
surprise gifts
Win Digital camera, ASP.NET Books, Free softwares!!
Enumering AppPools
06 Sep, 2006
Author:
XianhuiMeng
Summary
.NET Classes used :
System.DirectoryServices
????????? IIS 6??????????:
System.DirectoryServices.DirectoryEntry appPoolRoot = new System.DirectoryServices.DirectoryEntry(@"IIS://localhost/W3SVC/AppPools");
//?????????????????? IIS://localhost/W3SVC/AppPools/DefaultAppPool
System.Collections.IEnumerator AppPoolEnumer = appPoolRoot.Children.GetEnumerator();
while (AppPoolEnumer.MoveNext())
{
System.DirectoryServices.DirectoryEntry EntryPool = (System.DirectoryServices.DirectoryEntry)AppPoolEnumer.Current;
System.DirectoryServices.PropertyCollection properties = EntryPool.Properties;
System.Collections.IDictionaryEnumerator propertiesEnumer = properties.GetEnumerator();
textBox1.Text += "??????? = " + EntryPool.Name + System.Environment.NewLine + "____________________________________________" + System.Environment.NewLine;
while (propertiesEnumer.MoveNext())
{
System.DirectoryServices.PropertyValueCollection propertyvalue = (System.DirectoryServices.PropertyValueCollection)propertiesEnumer.Value;
if (propertyvalue.Count > 1)
{
for (int j = 0; j < propertyvalue.Count; j++)
{
textBox1.Text += "Name=" + propertiesEnumer.Key.ToString() + " Value= " + propertyvalue[j] + "--";
}
}
else
{
textBox1.Text += "Name=" + propertiesEnumer.Key.ToString() + " Value= " + propertyvalue[0] + System.Environment.NewLine;
}
}
}
Feedbacks about this page from members:
- No Feedbacks yet !! -
Submit Feedback
View All Feedbacks
Total
members
:
250996
Average new registrations per day (in last 7 days):
8
New Registration:
Open
Register Now
Talk to Webmaster
Tony John
Facebook
Google+
Twitter
Advertise
Privacy Policy
Terms of use
Contact Us
SpiderWorks Technologies Pvt Ltd.
All Rights Reserved.