有以下办法获取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版本的全部内容,更多相关内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复