To know the Server hostname which is currently served.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ahujabangalore
    New Member
    • Aug 2008
    • 1

    To know the Server hostname which is currently served.

    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
    Recognized Expert Expert
    • Jan 2007
    • 4980

    #2
    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.

    Comment

    Working...