Retrieving current host name

Results 1 to 2 of 2

Thread: Retrieving current host name

  1. #1
    Join Date
    Dec 1969

    Default Retrieving current host name

    I&#039m having problems converting all of my PERL functionality to ASP. In PERL, I was able to retrieve the host name of the computer from which the web page was being accessed. Does anyone know if this is possible to do in ASP as well? I also need to retrieve the IP Address of the computer on which the user is displaying the web site, and need to capture the User name (of the user that is currently logged in). Is anyone aware of a way of doing this in ASP, as opposed to PERL. Thanks, and look forward to hearing from you soon. Take care.

  2. #2
    Join Date
    Dec 1969

    Default RE: Retrieving current host name

    Request.ServerVariables("SERVER_NAME") will give you the server hostname<BR>Request.ServerVariables("REMOTE_ADDR") will give you the client&#039s IP<BR>Request.ServerVariables("REMOTE_HOST") will give you the client&#039s hostname, if known<BR>REquest.ServerVariables("LOGIN_USER") will capture username, if logged on with basic auth or challenge/response<BR><BR>Grab a copy of Wrox&#039s ASP programmers reference, you&#039ll find it indispensable<BR><BR>j

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts