get all sites under IIS
Check out this post - seems to be a brand-spanking new management API in the Microsoft.Web.Administration namespace:
http://blogs.msdn.com/carlosag/archive/2006/04/17/MicrosoftWebAdministration.aspx
Here's a quick graphical overview from that blog post:

And here's a "The Gu" post on Cool new IIS7 Features and APIs
Something like this will find all the sites, their application and their virtual directories in your IIS7 server:
static void Main(string[] args)
{
ServerManager mgr = new ServerManager(); foreach(Site s in mgr.Sites)
{
Console.WriteLine("Site {0}", s.Name); foreach(Application app in s.Applications)
{
Console.WriteLine("\tApplication: {0}", app.Path); foreach(VirtualDirectory virtDir in app.VirtualDirectories)
{
Console.WriteLine("\t\tVirtual Dir: {0}", virtDir.Path);
}
}
} Console.ReadLine();
}
get all sites under IIS的更多相关文章
- ASP.NET IIS Registration Tool (Aspnet_regiis.exe)
IIS Version Special cases for 32-bit versions of Aspnet_regiis.exe 6.0 You can run the 32-bit versio ...
- 使用 Microsoft.Web.Administration 管理iis
How to Automate IIS 7 Configuration with .NET How to Automate IIS 7 Configuration with .NET Are you ...
- Debug your ASP.NET Application while Hosted on IIS
转摘:http://www.codeproject.com/Articles/37182/Debug-your-ASP-NET-Application-while-Hosted-on-IIS This ...
- ASP.NET MVC 从零开始 - 请求处理
这篇文章是从我的 github 博客 lxconan.github.io 导入的. 这是这个系列的第三篇了.前两篇文章请参见: ASP.NET MVC 从零开始 - Create and Run AS ...
- Web Servers in Visual Studio for ASP.NET Web Projects
https://msdn.microsoft.com/en-us/library/58wxa9w5(v=vs.120).aspx When you develop web projects in Vi ...
- 检查.net代码中占用高内存函数(翻译)
哈哈,昨天没事做,在CodeProject瞎逛,偶然看到这篇文章,居然读得懂,于是就翻译了一下,当练习英语,同时增强对文章的理解,发现再次翻译对于文章的一些细节问题又有更好的理解.下面是翻译内容,虽然 ...
- [引]ASP.NET MVC 4 Content Map
本文转自:http://msdn.microsoft.com/en-us/library/gg416514(v=vs.108).aspx The Model-View-Controller (MVC) ...
- 转 HTTP/2: The Long-Awaited Sequel
HTTP/2: The Long-Awaited Sequel Thursday, October 9, 2014 2:01 AM 6 Ready to speed things up? Here a ...
- Visual Studio中用于ASP.NET Web项目的Web服务器
当您在 Visual Studio 中开发 Web 项目时,需要 Web 服务器才能测试或运行它们. 利用 Visual Studio,您可以使用不同的 Web 服务器进行测试,包括 IIS Expr ...
随机推荐
- javascript实现数据结构----栈
//栈是一种遵从后进先出原则的有序集合. //新添加的或待删除的元素都保存在栈的末尾,称作栈顶,另一端就叫栈底 //在栈里,新元素都靠近栈顶,旧元素都叫做栈底 function Stack(){ va ...
- StoryBoard中,TableView位置总是在顶部出现空白的解决
重设TableView的 contentInset 属性可解决. _tableView.contentInset = UIEdgeInsetsMake( -30, 0, 0, 0);
- nginx的配置文件 【nginx.conf】
#user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #erro ...
- Spring Boot集成Spring Data Reids和Spring Session实现Session共享
首先,需要先集成Redis的支持,参考:http://www.cnblogs.com/EasonJim/p/7805665.html Spring Boot集成Spring Data Redis+Sp ...
- .net core webapi jwt 更为清爽的认证
原文:.net core webapi jwt 更为清爽的认证 我的方式非主流,控制却可以更加灵活,喜欢的朋友,不妨花一点时间学习一下 jwt认证分为两部分,第一部分是加密解密,第二部分是灵活的应用于 ...
- [反汇编练习] 160个CrackMe之023
[反汇编练习] 160个CrackMe之023. 本系列文章的目的是从一个没有任何经验的新手的角度(其实就是我自己),一步步尝试将160个CrackMe全部破解,如果可以,通过任何方式写出一个类似于注 ...
- BMP文件的读取与显示
有三个函数能够完毕这一功能 1.BitBlt BitBlt 用于从原设备中复制位图到目标设备 void CMFCApplication1View::OnDraw(CDC* pDC) { CMFC ...
- hdu 1710 Binary Tree Traversals 前序遍历和中序推后序
题链;http://acm.hdu.edu.cn/showproblem.php?pid=1710 Binary Tree Traversals Time Limit: 1000/1000 MS (J ...
- 翻翻git之---"有趣效果"的自己定义View EasyArcLoading
转载请注明出处:王亟亟的大牛之路 早上写了一个关于MD的文章,下午给编译器调了个色,感觉要上天了.所以为了试颜色就出了这篇文章,让大家一起瞎一下 好了废话不说.这一片给大家介绍一个当做Dialog作用 ...
- 【转载】分布式RPC框架性能大比拼
dubbo.motan.rpcx.gRPC.thrift的性能比较 Dubbo 是阿里巴巴公司开源的一个Java高性能优秀的服务框架,使得应用可通过高性能的 RPC 实现服务的输出和输入功能,可以和 ...