添加引用:AspNetMMCExt 添加名字空间:using Microsoft.Aspnet.Snapin; AspNetManagementUtility aspnet = new AspNetManagementUtility(); string e;aspnet.DisplayAspNetConfigSettings( " sonic-zzw " , "" , " /SignCode " , " Default Web Site " , "" , Process.GetCurrentProcess().Id, out e); 转载于:https://www.cnblogs.com/pdfw/archive/2008/02/03/1063772.html