Solved

The USERname environment variable

Posted on 2009-07-16
5
216 Views
Last Modified: 2012-05-07
yes I can retrieve the computer signin username if the file exist on my computer, but if I put this code on another server it will only retrieve the server username if logged in.  I want to to be able to retrieve the username on the client side of anyone computer to display on a webpage, this is for intranet use.    

       <%
Response.Write("The USERname environment variable is : " & Environment.GetEnvironmentVariable("USERNAME"))
%>
0
Comment
Question by:sevensnake77
[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
  • 3
  • 2
5 Comments
 
LVL 15

Expert Comment

by:spprivate
ID: 24873051
Enable NT Authentication in IIS instead of anonymous access
0
 
LVL 9

Author Comment

by:sevensnake77
ID: 24873625
Ok but does the computer requires restart?

the value still comes up null
0
 
LVL 9

Author Comment

by:sevensnake77
ID: 24873661
I am trying to catch the client side because like i said it works on the main computer i am on but not on the living server. what do you think./?
0
 
LVL 15

Accepted Solution

by:
spprivate earned 500 total points
ID: 24873679
Please post your code .Also the do an IIS Reset.Essentially there would be a pop up asking for user name &password when you enable this option
0
 
LVL 9

Author Comment

by:sevensnake77
ID: 24873756
Ok that already happen but I do not want everyone to login this cannot happen dynamically. if not if everyone put a username and password. do they have to do this everytime or just once.
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

733 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