Connecting Tech Pros Worldwide Forums | Help | Site Map

To know the Server hostname which is currently served.

Newbie
 
Join Date: Aug 2008
Posts: 1
#1: Aug 11 '08
Hello,

I am working on asp and asp.net 1.1 with C#.

I am working with load balancer and providing feed to servers with some methods in my project. Sometimes when one server is busy because of heavy traffice its load is balanced by few connected servers and this time these servers receives data sent by different users.

Now my question is:

How can I get server information (like hostname, IP Adress etc.) which is recieving the data at this moment.
Thanks in advance!

Regds,
Sandeep

RedSon's Avatar
Site Moderator
 
Join Date: Jan 2007
Location: America
Posts: 3,393
#2: Aug 11 '08

re: To know the Server hostname which is currently served.


The IP address you can get from the connection information or the socket. I think the Socket class has some methods that let you get info about it. As for the host name you need access to a DNS server to retrieve that.
Reply


Similar Misc bytes