473,414 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Host Name / IP behind a load balancer

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!
Jul 19 '05 #1
1 5786
See the WMI script here
http://www.aspfaq.com/2263

"Peter Hurford" <pe***********@microcrest.com> wrote in message
news:#r*************@TK2MSFTNGP09.phx.gbl...
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!

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: exBK | last post by:
Hi, We use a load balancer for one of our web app. The application allows users to upload files/images, which gets uploaded to the server the user is connected to. My quesiton is how to...
2
by: James M. | last post by:
I have 2x Front-end Web servers (Win2003 Ent IIS6.0), setup with NLB (single Affinity, also using SQLServer session state) that are hosting a few .NET ASP web applications under the Default Website...
2
by: James | last post by:
We have two Windows Server 2003 Web servers behind an F5 load balancer("server1" and "server2"). Application requests are via the dns name of this "cluster" ("servervip"). The application needs...
0
by: DT | last post by:
We have service oriented architecture that comprises of a number of Win2k/IIS boxes. Some of these web service applications access an AS400 system for data acess (We are using HitSoftware's Ritmo...
2
by: Jeff | last post by:
I have an ASP.NET web page accessing a SQL database. I've used VS to build the app and stored it in the eNPTest02 directory of my localhost on my development machine. The database is on the web. ...
2
by: thinkfr33ly | last post by:
I have a WAP site powered by ASP.NET Mobile controls. We're using cookieless sessions and have an F5 Load Balancer that balances the load between two web servers. Every once in a while we'll get...
1
by: rampabbaraju | last post by:
I have a website developed in .Net 1.1 and is running on three servers under a load balancer. I want to add another server to the load balancer which will have the same application but converted to...
2
by: Softworks | last post by:
We're in the process of putting a load balancer into the mix. The setup will require that we run SSL on the load balancer. Checking for request.IsSecureConnection worked fine when the SSL...
14
by: John Kotuby | last post by:
Hi all, I have a situation where a Web Server at an install site does not currently have a publically registered Domain Name associated with the site. This requires that the a user access the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.