The USERname environment variable

Posted on 2009-07-16
Medium Priority
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"))
Question by:Seven price
  • 3
  • 2
LVL 15

Expert Comment

ID: 24873051
Enable NT Authentication in IIS instead of anonymous access

Author Comment

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

the value still comes up null

Author Comment

by:Seven price
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./?
LVL 15

Accepted Solution

spprivate earned 2000 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

Author Comment

by:Seven price
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.

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

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.
An ASP.NET Web Form User Control is not newly introduced in ASP.NET. In fact, it was an old technology yet still playing a role to generate web content, especially when we want to use it to have a better and easy way to control part of the web conte…
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…
Watch the video to know the simple way to remove or recover or reset lost or forgotten passwords of Outlook PST file. With Kernel Outlook Password Recovery tool such operation is very easy to perform. It is a freeware with limitation to use with 500…

627 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