How can I check that IIS7 is installed under OS ?
I am in .net 4.0
Thanks .
You could do the following
string w3wp = Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.System), "inetsrv\w3wp.exe");
FileVersionInfo versionInfo = FileVersionInfo.GetVersionInfo(w3wp);
Console.WriteLine(versionInfo.FileMajorPart);
You could also check Windows Registry HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\W3SVC\\Parameters for the Major Version.
您可以转到开始->运行,然后键入inetmgr,然后输入将打开IIS的版本,然后可以在其中检查版本。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.