Advertisement
ASP_Volume3 Databases/ Data Access/ DAO/ ADO #55467

Get the Computername of a server in a Web Farm

We recently run into a problem working with a web farm and replication. We where getting a error that the tech people were say it was code and us the code people was saying it was Server related. Well, First we know it only happens 3 out of 10, So it must be happening only on one or two servers. If it was code It would happen on all servers, right??? Well, Lets find out which servers get the error, but how? ServerVariables only returns BROWSER header information and we need machine specific data. A Clustered farm generally uses the same IP info on a load balancer. so how do we get machine specific data. Well, use WSH of course. Three Lines. Hope you enjoy it. This will not work on XP, because the disabled WSH by default. you can turn it on though. check MS Knowledge bases for instructions.

AI

AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Source Code
original-source
Set objWSHNet = CreateObject("WScript.Network")
Response.write objWSHNet.ComputerName & "<BR>"
Set objWSHSNet = Nothing
Original Comments (3)
Recovered from Wayback Machine