Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 162
  • Last Modified:

Getting the client's host name


Hello everybody.

Could somebody help me how to get the client's host name? I already used the Request.ServerVariables ("REMOTE_HOST")but the host name points to the web server. I need the client's host name who runs the web page. Please help.
0
Faiga Diegel
Asked:
Faiga Diegel
  • 3
  • 2
  • 2
  • +2
1 Solution
 
gator4lifeCommented:
Request.ServerVariables("REMOTE_ADDR") will give you the IP address of the client host where the request originated.  Usually, client IP addresses are not mapped to a name through a DNS, so this is the best that you can do.  Happy programming.

gator4life
(chomp, chomp)
0
 
HanbingLCommented:
That should be Request.ServerVariables("LOGON_USER")
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
gator4lifeCommented:
Actually, it depends on what faiga16 is trying to accomplish.  The "LOGON_USER" ServerVariable contains the Windows account that the user is impersonating while connected to your Web server.  If every user connects to the web server through anonymous access (the IUSR account), then this ServerVariable contains nothing.  However, if the users are being authenticated at this server, then this ServerVariable will contain a username value, not necessarily a "client host name".  When I think of a "client host", I think of the user agent (i.e. the browser) that is accessing the web server, not the user.  Therefore, if this is the case then the "REMOTE_ADDR" ServerVariable is indeed the correct variable to retrieve.

gator4life
(chomp, chomp)
0
 
COBOLdinosaurCommented:
This question has been classified abandoned. I will make a recommendation to the
moderators on its resolution in a week or two. I appreciate any comments
that would help me to make a recommendation.

<note>
Unless it is clear to me that the question has been answered I will recommend delete.  It is possible that a Grade less than A will be given if no expert makes a case for an A grade. It is assumed that any participant not responding to this request is no longer interested in its final disposition.
</note>

If the user does not know how to close the question, the options are here:
http://www.experts-exchange.com/help/closing.jsp


Cd&

0
 
gator4lifeCommented:
COBOL -

I would like to be considered for the points on this question.  The question poster never clarified exactly what they were trying to achieve after the experts posted responses, so I assume that one of our responses helped them.  In fact, my answer was a solution that would solve the problem originally asked.

gator4life
(chomp, chomp)
0
 
dorwardCommented:
The original question specifically asked for the host name, that has a defined meaning in networking and is not synonymous with either "host ip address" or "username". I don't see any indication that the origional question was intended to get the username, although I admit that the host ip address might have been acceptable to the questioner.
0
 
COBOLdinosaurCommented:
force accepted

COBOLdinosaur
PE Web Development
0
 
Faiga DiegelSr Database EngineerAuthor Commented:

Hello everyone,

I am so sorry for I did not closed this question. Honestly, it's been a long time since I open my account here and need to refresh my mind on how to close an open questions. It took me a while browsing and looking for help on how to view my pending questions.

Anyway, sorry again. I will be online more often.

Thanks :=)
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

  • 3
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now