How to programmatically get sites list and virtual dirs in IIS 7?

前端 未结 2 1093
旧巷少年郎
旧巷少年郎 2020-12-13 13:44

Does anybody know how to programmatically get the sites list and virtual dirs in IIS 7?

2条回答
  •  青春惊慌失措
    2020-12-13 14:23

    One important caveat to using the Microsoft.Web.Administration assembly is the code has to be running on a machine that has IIS7 installed.

    When I was developing a system to load IIS7 sites into a webpage on my windows XP machine I discovered this limitation. The API is great, I just wished I could have used it.

    Control IIS 7 server from Windows 2003 server programmatically

提交回复
热议问题