我是靠谱客的博主 落寞毛豆,这篇文章主要介绍.Net获取iis版本,现在分享给大家,希望可以做个参考。

有以下办法获取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;

转载于:https://www.cnblogs.com/luqian5588/p/3248663.html

最后

以上就是落寞毛豆最近收集整理的关于.Net获取iis版本的全部内容,更多相关内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(43)

评论列表共有 0 条评论

立即
投稿
返回
顶部