创建简单的IIS克隆 [英] Create simple IIS Clone
本文介绍了创建简单的IIS克隆的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试创建一个类似IIS的简单树,该树显示站点/虚拟目录/应用程序/文件夹/文件.
我必须在Win2003/Vista/Win2008/Win7(IIS 6和7).
我在显示所有文件夹时遇到了一些问题.例如,这个简单的代码无法发现物理目录.
Hi, i'm trying to create a simple tree like IIS that show Sites/Virtual Directory/Applications/Folder/Files.
I have to do this for Win2003/Vista/Win2008/Win7 (iis 6 and 7).
I have some problems to show all folder.
For example this simple code not discover physical directories.
static void Main(string[] args)
{
DirectoryEntry dir = new DirectoryEntry("IIS://Localhost/W3SVC/1/Root");
Expand(dir);
}
private static void Expand(DirectoryEntry entry)
{
foreach (DirectoryEntry child in entry.Children)
{
Console.WriteLine("{0} [{1}]", child.Name, child.SchemaClassName.ToString());
Expand(child);
}
}
推荐答案
感谢您的发帖!我建议将您的问题发布到MS论坛之一中,
首页 › 论坛
位于此处: http://forums.iis.net/
祝您度过愉快的一天!
这篇关于创建简单的IIS克隆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文