有以下办法获取iis版本.

        DirectoryEntry getEntity = new DirectoryEntry("IIS://localhost/W3SVC/INFO");
        string Version = getEntity.Properties["MajorIISVersionNumber"].Value.ToString();
        Response.Write("IIS版本号为:"+Version);

注意:
1、此方法同样适用于ASP.net。
2、此方法需引用程序集文件system.directoryservices.dll,使用命名空间:using System.DirectoryServices;

相关文章:

  • 2021-11-06
  • 2021-11-28
  • 2021-12-02
  • 2022-02-07
  • 2022-01-02
  • 2021-06-26
  • 2022-03-01
  • 2021-08-04
猜你喜欢
  • 2021-11-12
  • 2022-12-23
  • 2022-01-31
  • 2022-02-12
  • 2021-12-17
  • 2021-10-17
相关资源
相似解决方案