473,411 Members | 1,918 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

How to get the Windows current logged user name using ASP

mvr
Hi all

How to get the Windows current logged user name using Classic ASP.
If no direct way are there any work arounds.

Thanks
mvr
May 16 '06 #1
5 36891
mvr wrote:
Hi all

How to get the Windows current logged user name using Classic
ASP. If no direct way are there any work arounds.

1. Turn off Anonymous access to your site using IIS Manager
2. Use the LOGON_USER servervariable:
<%
response.write request.servervariables("LOGON_USER")
%>

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
May 16 '06 #2
If you have one person logged onto the console directly, and two people
logged in through terminal services, what do you want to see? You can
probably hook into ADSI or use WScript.Network, but I think it will require
significantly elevated privileges (typically not recommended for a classic
ASP application).

One possible workaround is to use a data store for this, and have a login
script in the startup folder that stores %USERNAME% in a table. It will be
tougher to detect logoffs and inactive/expired sessions, of course.

"mvr" <v_*****@hotmail.com> wrote in message
news:uO**************@TK2MSFTNGP05.phx.gbl...
Hi all

How to get the Windows current logged user name using Classic ASP.
If no direct way are there any work arounds.

Thanks
mvr

May 16 '06 #3
Silly me, I was thinking the user logged onto the machine, not the user
requesting the web page.

"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:ex**************@TK2MSFTNGP05.phx.gbl...
mvr wrote:
Hi all

How to get the Windows current logged user name using Classic
ASP. If no direct way are there any work arounds.

1. Turn off Anonymous access to your site using IIS Manager
2. Use the LOGON_USER servervariable:
<%
response.write request.servervariables("LOGON_USER")
%>

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

May 16 '06 #4
:-)
You're just a little out of practice

Aaron Bertrand [SQL Server MVP] wrote:
Silly me, I was thinking the user logged onto the machine, not the
user requesting the web page.


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
May 16 '06 #5
I know, what on earth am I doing here, anyway...
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:Ov**************@TK2MSFTNGP04.phx.gbl...
:-)
You're just a little out of practice

May 16 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: John Dalberg | last post by:
I want to automate the process of logging into an intranet. I want to pull out the username of the Windows user logged into the machine running the browser and use the username in my app. How can I...
4
by: Paul Ponzelli | last post by:
I'm using the VB.NET language in ASP.NET, with Windows XP on the desktops and Windows 2003 on the network servers. When users log on, they have to enter a user name and password in the netowrk...
9
by: Brad Allison | last post by:
Is there a simple way to get the current system user name? Thanks for the information. Brad
3
by: Lattis | last post by:
I have the following problem: User A is logged in to a windows 2000 terminal. He runs an application which runs under the credentials of a different user. If I try to see the current user...
2
by: joerozario | last post by:
i have done windows application in .net2005 i want get logged in user (windowes current session user name) how to get it? thank u
3
by: Depechie | last post by:
Hey guys, small question. Can I find out if the current logged on use is a local user or a domain user ? And please don't use any solution that uses String parsing... What I need is to get...
1
by: Rogger1603 | last post by:
Hi All, I’m new to JavaScript programming. I need to obtain a windows login user name using JavaScript. Can any one give some helpful thought? Thanks Rogger
1
by: suckerpunchnz | last post by:
Hi there, I'm using this audit trail code (basAuditTrail module) to log changes in my database, but I'm needing it to track by the user name logged into Access not by the account logged into...
3
by: swetha123 | last post by:
hello, I don't know how to use cookies please help me in this I am using the dream weaver cs4 I designed the navigation bar to my page using dream weaver cs4 navigation bar contains...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.