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 ...
随机推荐
- 【前端学习笔记】关于CSS通过一个块改变另一个块的样式
<body><div id="a" style="background:#0F0; height:100px; width:100px;"&g ...
- 棋盘制作 BZOJ 1057
棋盘制作 [问题描述] 国际象棋是世界上最古老的博弈游戏之一,和中国的围棋.象棋以及日本的将棋同享盛名.据说国际象棋起源于易经的思想,棋盘是一个8*8大小的黑白相间的方阵,对应八八六十四卦,黑白对应阴 ...
- 标准C程序设计七---30
Linux应用 编程深入 语言编程 标准C程序设计七---经典C11程序设计 以下内容为阅读: <标准C程序设计>(第7版) 作者 ...
- spring-boot-nginx代理-docker-compose部署
在本地测试,使用docker部署不用在意环境 java测试项目: web框架:spring boot 框架 项目管理:maven 数据库:redis + postgres + mongo 部署相关:n ...
- Linux下文件操作命令cat(转)
语法格式: cat [-AbeEnstTuv] [--help] [--version] fileName 参数说明: -n 或 --number:由 1 开始对所有输出的行数编号. -b 或 --n ...
- JavaScript 函数作用域的“提升”现象
在JavaScript当中,定义变量通过var操作符+变量名.但是不加 var 操作符,直接赋值也是可以的.例如 : message = "hello JavaScript ! " ...
- 【内核研究】处理者_Handler
虽然MessageQueue提供了直接读/写的函数接口.但对于程序猿来说,一般不直接读/写消息队列.之前了解到,在Looper.loop()函数中.当取出消息后,会回调msg.target对象的han ...
- 转:给 Android 开发者的 RxJava 详解
转自: http://gank.io/post/560e15be2dca930e00da1083 评注:多图解析,但是我还是未看懂. 前言 我从去年开始使用 RxJava ,到现在一年多了.今年加入 ...
- 消息列队 分布式事务解办法 celery flower使用总结
前言 项目中有场景 需要用到 分布式事务业务,经过查下资料把学习相关笔记做记录方便他人或者自己后面查看. 场景 在网站A业务中有个操作 是 要在网站B中新建一台服务器跑业务.A中执行B中的接口创建服务 ...
- mysql 复制数据库
为了方便快速复制一个数据库,可以用以下命令 将db1数据库的数据以及表结构复制到newdb数据库 创建新的数据库 #mysql -u root -p123456 mysql>CREATE DAT ...