473,701 Members | 2,735 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.ServerV ariables("SERVE R_NAME") & " (" &
Request.ServerV ariables("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 5800
See the WMI script here
http://www.aspfaq.com/2263

"Peter Hurford" <pe***********@ microcrest.com> wrote in message
news:#r******** *****@TK2MSFTNG P09.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.ServerV ariables("SERVE R_NAME") & " (" &
Request.ServerV ariables("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
1208
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 synchronize the uploaded files between 2 web servers? What is the common practice when using a load balancer to share the resources, especially images that are hard to be read from a UNC. Any tips are greatly appreciated. TIA.
2
5611
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 in IIS, and accessing via a Intranet LAN (this is not publicly available). NETWEB1: NIC1 172.16.17.220 172.16.17.244 (NLB Virtual IP) NIC2 172.16.17.221
2
1264
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 to return the name of the server the handles the request (asp) so the application can check a local security group on that server to grant or deny access to that appliation. Why this way? I don't know, I did not write the app......
0
1617
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 .net native driver). For fail over we route these requests through a hardware based load balancer (BigIP). The BigIP allows us to fail over to a secondary AS400 system in case the primary one fails.
2
2190
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. I've found a way that works on the web, and I'm trying to get it to also work in debug mode in the IDE. The "on the web" page and my SQL database are hosted by a third party (on separate servers). Since debug mode opens IE and loads my page...
2
2363
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 the following exception: System.FormatException: Invalid length for a Base-64 char array. at System.Convert.FromBase64String(String s) at System.Web.UI.LosFormatter.Deserialize(String input) at...
1
1113
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.0. My app does not store anything in the session, but is dependent on Viewstate and cookies. My doubt is that whether Viewstate generated by 1.1 can be understood by 2.0 and vice versa. Thanks
2
3010
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 certificate was on the web server. Now it returns false when SSL is on the load balancer. Is there a way to check for a secure connection when SSL is on the load balancer? TIA Tina
14
4046
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 site from a remote (outside the LAN) browser using the IP address, as in http://192.35.78.234 . Currently in my code I use the following syntax to obtain the Root Web path which I then append as a prefix to Images and Links in external documents...
0
8731
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8649
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9220
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9082
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8933
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7821
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5904
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3098
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2396
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.