Host Name / IP behind a load balancer

P

Peter Hurford

Hi,

Have just noticed some code not working properly. I have a couple of
identical web servers set up, and a load balancer out front.

I execute the line of code....

Response.Write Request.ServerVariables("SERVER_NAME") & " (" &
Request.ServerVariables("LOCAL_ADDR") & ")"


Problem is, in this environment, it's giving me the name and the ip
address of the load balancer, not the server.

The reason I'm doing this (obviously) is I want to be able to know which
of the servers is serving the page.

The code, registry etc. on each server are identical, and must remain
so. The only differences (of course) are things like their host names,
ip addresses etc.

I'm sure I've seen this done but can't remember how, and can't find
anything on the msdn. Anyone out there know?

TIA
 

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

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top