Host Name / IP behind a load balancer

Discussion in 'ASP General' started by Peter Hurford, Aug 7, 2003.

  1. 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

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Peter Hurford, Aug 7, 2003
    #1
    1. Advertising

  2. See the WMI script here
    http://www.aspfaq.com/2263



    "Peter Hurford" <> wrote in message
    news:#...
    > 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
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
    Aaron Bertrand - MVP, Aug 7, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. z. f.
    Replies:
    0
    Views:
    353
    z. f.
    Feb 24, 2005
  2. Orpheus66
    Replies:
    0
    Views:
    4,403
    Orpheus66
    Jul 30, 2003
  3. Replies:
    1
    Views:
    323
    bruce barker
    Jan 5, 2007
  4. Softworks

    IsSecureConnection with Load Balancer

    Softworks, Feb 5, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    861
    Softworks
    Feb 5, 2007
  5. David Brockus
    Replies:
    1
    Views:
    969
    Patrice
    Jun 25, 2009
Loading...

Share This Page