How to Enumerate all IIS Web Servers on the LAN?
The user interface of an application we're developing internally needs to be able to present the user with a list of the Web servers currently running in the domain. Getting this sort of information for SQL Server databases is fairly easy, but I haven't been able to locate a simple, relatively fast way to do it for IIS Web servers.
The only way I开发者_如何学JAVA've been able to do it so far is to use the Win32 API to enumerate all servers in the domain, then use ServerManager to attempt to establish an IIS connection to the server. Unfortunately, that's a lot like trying to jump on a landmine to see if it will explode: it's not the safest or most efficient way to determine if it's a landmine.
So I'm asking: what is the most efficient way to enumerate the available web servers in the domain or on the LAN? I'm very open to suggestion, and thank you all in advance.
If you install Bonjour for Windows (or another ZeroConf implementation), you can use it to discover the HTTP providers on your local network that advertives their services via ZeroConf.
- http://www.zeroconf.org/
- http://en.wikipedia.org/wiki/Zero_configuration_networking
- http://en.wikipedia.org/wiki/Bonjour_(software)#Microsoft_Windows_implementation
- http://support.apple.com/kb/HT2250
精彩评论