Solved

Display hostname and username on Intranet

Posted on 2003-10-27
8
581 Views
Last Modified: 2012-06-27
I would like to display the hostname (or computername) and username (or logonID) on our Intranet support page. Can some one tell me where I can download the samples or post the code here?
 
Thanks.
 
0
Comment
Question by:blin2000
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
8 Comments
 
LVL 4

Accepted Solution

by:
dukestaTAI earned 125 total points
ID: 9628766
This code will list what you want but you have to have logging turned on in your IIS server.  Also you have to have reverse lookup enable in you DNS to get the host name or it will just give you the IP address.

<%
Response.Write Request.ServerVariables("AUTH_USER ") & "  " & Request.ServerVariables("REMOTE_HOST ")
%>

This code will list all of the possible items that you can request from Server Variables.

<%
For each item in Request.ServerVariables
     Response.Write "<li>" & item & " = " & Request.ServerVariables(item)
next
%>
0
 
LVL 16

Expert Comment

by:JohnBPrice
ID: 9628811
in ASP

<HTML>
<BODY>
Server Hostname: <%=Request.ServerVariables("SERVER_NAME")%><BR>
Client Hostname: <%=Request.ServerVariables("REMOTE_HOST")%><BR>
User: <%=Request.ServerVariables("AUTH_USER")%>
</BODY>
</HTML>

0
 
LVL 7

Author Comment

by:blin2000
ID: 9631240
Thanks you for all help. We have an internal DNS on the web server and IIS logging is enabled. The client name display ip address and user display non thing. why?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Expert Comment

by:dukestaTAI
ID: 9633202
0
 
LVL 4

Expert Comment

by:dukestaTAI
ID: 9633218
0
 
LVL 4

Expert Comment

by:dukestaTAI
ID: 9633229
0
 
LVL 4

Expert Comment

by:dukestaTAI
ID: 9633256
Anonymous should not be checked and NT Challenge should be in order to get auth_user value
0
 
LVL 16

Expert Comment

by:JohnBPrice
ID: 9633459
Basic authentication will also set AUTH_USER
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Apps blocked by Java 9 103
Auto-indent certain lines in Notepad++ 10 169
Query group by data in SQL Server - cursor? 3 85
Java Inheritance super keyword use 8 71
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question