列出 IIS c# 中的所有网站 [英] List all websites in IIS c#

查看:23
本文介绍了列出 IIS c# 中的所有网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法使用 c# 列出 IIS 中存在的所有活动网站?

Is there a way to list all active websites that exist within IIS using c#?

谢谢

Sp

推荐答案

这是一篇文章,解释了这是如何做到的也可以使用来自 System.DirectoryServices 命名空间的类来完成作为 IIS 7 引入的 Microsoft.Web.Administration 命名空间.

Here's an article explaining how this could be done using classes from the System.DirectoryServices namespace as well as the Microsoft.Web.Administration namespace which was introduced with IIS 7.

这篇关于列出 IIS c# 中的所有网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆