473,387 Members | 1,541 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

HOWTO: Detect IIS version ?

The target: Detect IIS version on server
The way:
switch (Environment.OSVersion.Version.Major)
{
case 4:
return IISVersion.IIS4;
break;
case 5:
return IISVersion.IIS5:
break;
case 6:
return IISVersion.IIS6;
break;
default:
return IISVerion.None;
break;
}

Questions:
1) I'm not sure about 6 and can not check this (no current installation)
2) Any "smarter" way you know to do this (in case that I'm freak and
install IIS 6 on Win2000 eg)

Ideas?

TNX
--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "

Nov 16 '05 #1
1 7948
Tamir,

Try this

FileVersionInfo verinfo =
FileVersionInfo.GetVersionInfo(@"C:\WINNT\system32 \inetsrv\inetinfo.exe");

MessageBox.Show(verinfo.FileMajorPart);
MessageBox.Show(verinfo.FileVersion);
--
Shak
(Houston)

"Tamir Khason" <ta**********@tcon-NOSPAM.co.il> wrote in message
news:#G**************@TK2MSFTNGP11.phx.gbl...
The target: Detect IIS version on server
The way:
switch (Environment.OSVersion.Version.Major)
{
case 4:
return IISVersion.IIS4;
break;
case 5:
return IISVersion.IIS5:
break;
case 6:
return IISVersion.IIS6;
break;
default:
return IISVerion.None;
break;
}

Questions:
1) I'm not sure about 6 and can not check this (no current installation) 2) Any "smarter" way you know to do this (in case that I'm freak and
install IIS 6 on Win2000 eg)

Ideas?

TNX
--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: R. Rajesh Jeba Anbiah | last post by:
Here is a nice code to detect utf-8 <http://in2.php.net/utf8_encode#39986> But, I couldn't find out the logic behind the script. If anyone knows that please share. Particularly I would like to...
4
by: Logan | last post by:
Several people asked me for the following HOWTO, so I decided to post it here (though it is still very 'alpha' and might contain many (?) mistakes; didn't test what I wrote, but wrote it - more or...
2
by: msnews.microsoft.com | last post by:
Hi, My C# application used a COM. When I deploy my application, how to detect if the target machine has installed the COM? Thanks, Max
2
by: EMW | last post by:
I created my page to work on a 800x600 size window, but when the user has his/her screen set on a larger size, they'll get a empty area at the right side of the screen. I don't like this, looks...
1
by: Roy | last post by:
Hi, I have a problem that I have been working with for a while. I need to be able from server side (asp.net) to detect that the file i'm streaming down to the client is saved...
4
by: Ray Dukes | last post by:
What I am looking to do is map the implementation of interface properties and functions to an inherited method of the base class. Please see below. ...
2
by: Richard Weigel | last post by:
Hello, I have the problem, to protect a library against unauthorized usage. For realizing this, I want to identify the calling program (path+filename) to check if it has a digital signature....
3
by: Dan Sikorsky | last post by:
I can send email using C# and SMTP, but keep closing the connection before the .eml file has left the Queue folder. The length of time the .eml file stays in the Queue folder is dependent on the...
7
by: =?Utf-8?B?QVRT?= | last post by:
HOWTO Make CStr for JavaScript on ASP w/ Request.Form and QueryString In ASP, Request.Form and Request.QueryString return objects that do not support "toString", or any JavaScript string...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.