Library code snippets
Determining the logged-on user from ASP
By ElementK Journals, published on 14 Jul 2001
If you're using Basic or NT Challenge/Response security for access to
your Web site, you can programmatically determine which user is
accessing a page at any given time. To do so, simply interrogate the
value of the following:
request.serverVariables("LOGON_USER")
Note that, by definition, you'll simply get back an empty string if
you're using anonymous security on your Web site.
Related articles
Related discussion
-
Header and Footer in Web page print
by fhajaj (4 replies)
-
help me to get simple requirement
by Slicksim (1 replies)
-
Gridview -> Template Field -> Button
by antti.simonen (1 replies)
-
Classic ASP : Page expires
by chezhian_in05 (0 replies)
-
ASP VS PHP
by paulfp (9 replies)
Related podcasts
-
ASP.NET Caching and Performance
Steve Smith, owner of ASP Alliance and Lake Quincy Media joins us today to teach us about some hidden gems in ASP.NET caching and performance. Steve’s expertise in this area comes from first-hand experience as Lake Quincy’s ad system serves over 60 requests per second and handles over 150 million...
Related jobs
-
Microsoft .Net Architect
in AMSTERDAM (€50K-€90K per annum) -
Microsoft Dynamics CRM Technical Consultant
in Netherlands (€50K-€90K per annum) -
Technical Support Engineer EMEA
in Reading (£50K-£50K per annum) -
Solutions Engineer
in Reading (£50K-£60K per annum)
Hi, when I use server variable for retrieve username I get empty string when I turn off anonymous access off I get this error (This is usually caused by a server-side script not sending the proper WWW-Authenticate header field. Using Active Server Pages scripting this is done by using the AddHeader method of the Response object to request that the client use a certain authentication method to access the resource.)
Is it possible to use ASP 3.0 on IIS to logon the user under windows challenge response. That is ASP logs on the user - so the user doesn't have to participate in the challenge response?
I'm installing element K on a windows NT server and am using certificates to authenticate users from another system. LDAP isn't yet available. I can use session variables and the like to controlaccess to pages but not objects (eg. shockwave files) in the directory. What I'd like to do is lock down or unlock access to the whole directory for each user in asp using a logon page outside the directory.
Any help would be appreciated ...
Is it possible to use ASP 3.0 on IIS to logon the user under windows challenge response. That is ASP logs on the user - so the user doesn't have to participate in the challenge response?
I'm installing element K on a windows NT server and am using certificates to authenticate users from another system. LDAP isn't yet available. I can use session variables and the like to controlaccess to pages but not objects (eg. shockwave files) in the directory. What I'd like to do is lock down or unlock access to the whole directory for each user in asp using a logon page outside the directory.
Any help would be appreciated ...
Hi,
How can I determine the logged-on user on my test environment. I've locally installed on NT Apache 1.3.x, ColdfusionMX. If I'm using CGI.AUTH_USER I get always an empty string. What can I do to get the logged-on user even I've no domain in my test environment.
Thanks for help
To get the ID of a user on an Intranet where access is managed through domain rights, take away all priviledges that the IUSER account has to that web or subweb, then access the identity servervariables to get the user ID (one of USER, AUTHUSER, LOGON_USER).
To get the ID of a user on an Intranet where access is managed through domain rights, take away all priviledges that the IUSER account has to that web or subweb, then access the identity servervariables to get the user ID (one of USER, AUTHUSER, LOGON_USER).
This thread is for discussions of Determining the logged-on user from ASP.