473,569 Members | 2,984 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 36979
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.serverv ariables("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_*****@hotmai l.com> wrote in message
news:uO******** ******@TK2MSFTN GP05.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******@NOyah oo.SPAMcom> wrote in message
news:ex******** ******@TK2MSFTN GP05.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.serverv ariables("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******@NOyah oo.SPAMcom> wrote in message
news:Ov******** ******@TK2MSFTN GP04.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
4588
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 get the logged in username? Do I have to disable the anonymous access in IIS? I rather not because the site is running under a certain domain...
4
1729
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 operating system. Is there a function or other means I can use to capture the Windows 2003 login user name for use in my code? Thanks in advance, ...
9
1663
by: Brad Allison | last post by:
Is there a simple way to get the current system user name? Thanks for the information. Brad
3
15902
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 throught the application I can only see the user that started the thread. How can I see the user that is logged in?? I tried the following code: ...
2
1407
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
1932
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 the display name of the current user and the only way I'm able to do this is using a DLL wrapper :
1
3009
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
2623
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 Windows. Does anybody know how to change this? Your help would be much appreciated. Thanks heaps. Phil. This is the code I'm using....it seems...
3
2386
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 Home, Retail Contact Us
0
8138
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7681
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7983
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6290
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5514
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3662
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1229
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
950
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.