Identify Remote Web Server

  • Thread starter Thread starter James
  • Start date Start date
J

James

Hi, I am trying to find the type of web server being used at a remote
website, but have no idea where to start to be honest. I have written a
webpage class that gathers information about that webpage (keywords and
links etc), I need to find whether the server the webpage is on is either
IIS or Linux etc. Any pointers to a class which I could work with in the
..NET 2 FCL to accomplish this?
 
You would need to look in the HTTP Headers to see if the server told you. If
it didn't then there is no way to tell AFAIK.

HTH

Ciaran O'Donnell
 
Thus wrote James,
Hi, I am trying to find the type of web server being used at a remote
website, but have no idea where to start to be honest. I have written
a webpage class that gathers information about that webpage (keywords
and links etc), I need to find whether the server the webpage is on is
either IIS or Linux etc. Any pointers to a class which I could work
with in the .NET 2 FCL to accomplish this?

Use either System.Net.WebClient or System.Net.HttpWebRequest to send a HTTP
request and check the HTTP header "Server" in the response.

Note that many sites don't send Server headers, because doing that may reveal
security vulnerabilities.

Cheers,
 
Thanks to both of you. I will wondered if there was a way to get a
HttpWebResponse from the Webbrowser control in any way but this doesn' seem
possilbe. I have mshtml wired in also but still no properties, does anyone
know any better?

Thanks
James
http://www.bandwidthvista.com
 
Thus wrote James,
Thanks to both of you. I will wondered if there was a way to get a
HttpWebResponse from the Webbrowser control in any way but this doesn'
seem possilbe. I have mshtml wired in also but still no properties,
does anyone know any better?

I guess you can combine the two by using HttpWebRequest/HttpWebResponse to
download local copies, and let the WebBrowser control display these copies.

Cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top