|
 |
asptoday_discuss thread: NT logged in with Anonymous access
Message #1 by "Gib Worth" <gib.worth@v...> on Sat, 13 Oct 2001 04:07:02
|
|
All,
Is it possible to get the username of the user logged in on the network
with an asp script when anonymous access is used in IIS?
Thanks in advance...
Gib
Message #2 by "Rich McQuaid" <remcq@m...> on Sat, 13 Oct 2001 10:44:53 -0400
|
|
Gib,
You will always get the internet user account information, which is
usually IUSR_COMPUTERNAME. You could force all users to logon to the
application rather than the network and store a user name in your
database. There's a good ASPToday article on this from 7/4/2000 titled
"Advanced Login Management System using SQL and ASP." Here's the link
http://www.asptoday.com/content/articles/20000704.asp?UseHB=True&WROXEMP
TOKEN=1596489Zc4MUnf53dSuTY6x8Sd
Rich
-----Original Message-----
From: Gib Worth [mailto:gib.worth@v...]
Sent: Saturday, October 13, 2001 4:07 AM
To: ASPToday Discuss
Subject: [asptoday_discuss] NT logged in with Anonymous access
All,
Is it possible to get the username of the user logged in on the network
with an asp script when anonymous access is used in IIS?
Thanks in advance...
Gib
Message #3 by "Worth, Gib" <Gib.Worth@v...> on Sat, 13 Oct 2001 20:30:20 -0700
|
|
Thanks for the response. This is for our intranet site inside the firewall
and I really don't want to make the users "log in" again. I was just trying
to provide some customized services to the logged in user. I can read
through the active directory and determine group membership rather easily,
the only missing piece is being able to get the username. I can't believe
that this info isn't stored somewhere on the remote machine.
-----Original Message-----
From: Rich McQuaid [mailto:remcq@m...]
Sent: Saturday, October 13, 2001 8:45 AM
To: ASPToday Discuss
Subject: [asptoday_discuss] RE: NT logged in with Anonymous access
Gib,
You will always get the internet user account information, which is
usually IUSR_COMPUTERNAME. You could force all users to logon to the
application rather than the network and store a user name in your
database. There's a good ASPToday article on this from 7/4/2000 titled
"Advanced Login Management System using SQL and ASP." Here's the link
http://www.asptoday.com/content/articles/20000704.asp?UseHB=True&WROXEMP
TOKEN=1596489Zc4MUnf53dSuTY6x8Sd
Rich
-----Original Message-----
From: Gib Worth [mailto:gib.worth@v...]
Sent: Saturday, October 13, 2001 4:07 AM
To: ASPToday Discuss
Subject: [asptoday_discuss] NT logged in with Anonymous access
All,
Is it possible to get the username of the user logged in on the network
with an asp script when anonymous access is used in IIS?
Thanks in advance...
Gib
Message #4 by "George Cioroianu" <georgecioroianu@h...> on Tue, 16 Oct 2001 17:43:22
|
|
> Thanks for the response. This is for our intranet site inside the
firewall
> and I really don't want to make the users "log in" again. I was just
trying
> to provide some customized services to the logged in user. I can read
> through the active directory and determine group membership rather
easily,
> the only missing piece is being able to get the username. I can't
believe
> that this info isn't stored somewhere on the remote machine.
>
> -----Original Message-----
> From: Rich McQuaid [mailto:remcq@m...]
> Sent: Saturday, October 13, 2001 8:45 AM
> To: ASPToday Discuss
> Subject: [asptoday_discuss] RE: NT logged in with Anonymous access
>
>
> Gib,
>
> You will always get the internet user account information, which is
> usually IUSR_COMPUTERNAME. You could force all users to logon to the
> application rather than the network and store a user name in your
> database. There's a good ASPToday article on this from 7/4/2000 titled
> "Advanced Login Management System using SQL and ASP." Here's the link
>
> http://www.asptoday.com/content/articles/20000704.asp?UseHB=True&WROXEMP
> TOKEN=1596489Zc4MUnf53dSuTY6x8Sd
>
> Rich
>
> -----Original Message-----
> From: Gib Worth [mailto:gib.worth@v...]
> Sent: Saturday, October 13, 2001 4:07 AM
> To: ASPToday Discuss
> Subject: [asptoday_discuss] NT logged in with Anonymous access
>
>
> All,
>
> Is it possible to get the username of the user logged in on the network
> with an asp script when anonymous access is used in IIS?
>
> Thanks in advance...
> Gib
>
>
Gib,
you can force NTLM authentication (in an anonymous environment) using the
following:
<%
if request.servervariables("remote_user")="" then
response.status = "401 Unauthorized"
end if
%>
Then you can use request.servervariables("remote_user") to get the User
Name. The users will not be prompted for authentication if you are on an
intranet and the URL does not contain dots. Do not use DNS registration
(e.g. http://www.name.com/path) use WINS registration of the site instead
or the server name (e.g. http://servername/path).
|
|
 |