Solved

Display hostname and username on Intranet

Posted on 2003-10-27
8
582 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
Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

 
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

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!

Question has a verified solution.

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

This is an explanation of a simple data model to help parse a JSON feed
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Introduction to Processes

707 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