Tag: 网络管理

在IIS Express中抛出“NotImplementedException”的Site的State属性

我使用Microsoft.Web.Administration.dll通过使用以下代码检查我的网站的状态。 它适用于IIS,但当它在IIS Express中使用时,’State’属性会抛出’NotImplementedException’。 ServerManager manager = new ServerManager() foreach (Site site in manager.Sites){ If (site.State == ObjectState.Started) { ….. } } 有人遇到过这个问题吗?