打开 ASP.NET 配置设置窗体 添加引用:AspNetMMCExt 添加名字空间:using Microsoft.Aspnet.Snapin; AspNetManagementUtility aspnet = new AspNetManagementUtility(); string e; aspnet.DisplayAspNetConfigSettings("sonic-zzw", "", "/SignCode", "Default Web Site", "", Process.GetCurrentProcess().Id, out e);