在使用C#操作IIS创建应用程序池出现异常:无效索引(Exception from HRESULT:0x80070585)
相关代码:
public static string CreateAppPool(string appPoolName, string frameworkVersion, string managedPipelineMode) { DirectoryEntry rootfolder = new DirectoryEntry("IIS://localhost/W3SVC/APPPOOLS"); try { DirectoryEntry appPool = rootfolder.Chil