Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: capture username parameter from users computer


Message #1 by "Scott Fretheim" <sfretheim@d...> on Fri, 5 Jul 2002 16:53:41
As our users log into our LAN their 'userid' becomes part of the machine 
environment (%username%)and is available to various applications (drive 
mapping scripts, Outlook, etc.).  Is there a way that information can be 
read by our web/application servers so that I don't have to require yet 
another login to the web site?

I would ultimately like to compare the username/currentdate to a table 
containing username/lastlogin so that I can display a page that shows all 
of the changes to the website since the users last login.

Thanks 
Message #2 by Annie Hunt <ajhunt@b...> on Fri, 5 Jul 2002 16:57:32 +0100
All mine log in with their NT user name and password and this works for me:
user = Request.ServerVariables("LOGON_USER")

-----Original Message-----
From: Scott Fretheim [mailto:sfretheim@d...]
Sent: 05 July 2002 17:54
To: ASP Web HowTo
Subject: [asp_web_howto] capture username parameter from users computer


As our users log into our LAN their 'userid' becomes part of the machine 
environment (%username%)and is available to various applications (drive 
mapping scripts, Outlook, etc.).  Is there a way that information can be 
read by our web/application servers so that I don't have to require yet 
another login to the web site?

I would ultimately like to compare the username/currentdate to a table 
containing username/lastlogin so that I can display a page that shows all 
of the changes to the website since the users last login.

Thanks 

---

Improve your web design skills with these new books from Glasshaus.

Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
Message #3 by "Scott Fretheim" <sfretheim@d...> on Fri, 5 Jul 2002 18:40:38
Thanks for the suggestion, unfortunately, it's not working on our system.  
Are you aware of server or workstation settings that would inhibit this?

Thanks

> All mine log in with their NT user name and password and this works for 
me:
user = Request.ServerVariables("LOGON_USER")

-----Original Message-----
From: Scott Fretheim [mailto:sfretheim@d...]
Sent: 05 July 2002 17:54
To: ASP Web HowTo
Subject: [asp_web_howto] capture username parameter from users computer


As our users log into our LAN their 'userid' becomes part of the machine 
environment (%username%)and is available to various applications (drive 
mapping scripts, Outlook, etc.).  Is there a way that information can be 
read by our web/application servers so that I don't have to require yet 
another login to the web site?

I would ultimately like to compare the username/currentdate to a table 
containing username/lastlogin so that I can display a page that shows all 
of the changes to the website since the users last login.

Thanks 

---

Improve your web design skills with these new books from Glasshaus.

Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
Message #4 by "phil griffiths" <pgtips@m...> on Mon, 8 Jul 2002 08:42:07
You can either disable anonymous access in IIS config, or you can include 
script like this at the top of any pages which need the user id:

If Len(Trim(Request.ServerVariables ("LOGON_USER"))) = 0 Then
	Response.Status = "401 Unauthorized"
	Response.AddHeader "WWW-Authenticate", "NTLM"
	Response.End
End If

HTH
Phil
> Thanks for the suggestion, unfortunately, it's not working on our 
system.  
A> re you aware of server or workstation settings that would inhibit this?

> Thanks

> > All mine log in with their NT user name and password and this works 
for 
m> e:
u> ser = Request.ServerVariables("LOGON_USER")

> -----Original Message-----
F> rom: Scott Fretheim [mailto:sfretheim@d...]
S> ent: 05 July 2002 17:54
T> o: ASP Web HowTo
S> ubject: [asp_web_howto] capture username parameter from users computer

> 
A> s our users log into our LAN their 'userid' becomes part of the machine 
e> nvironment (%username%)and is available to various applications (drive 
m> apping scripts, Outlook, etc.).  Is there a way that information can be 
r> ead by our web/application servers so that I don't have to require yet 
a> nother login to the web site?

> I would ultimately like to compare the username/currentdate to a table 
c> ontaining username/lastlogin so that I can display a page that shows 
all 
o> f the changes to the website since the users last login.

> Thanks 

> ---

> Improve your web design skills with these new books from Glasshaus.

> Usable Web Menus
h> ttp://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r> -20
C> onstructing Accessible Web Sites
h> ttp://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r> -20
P> ractical JavaScript for the Usable Web
h> ttp://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r> -20
-> --
C> hange your mail options at 
t> o unsubscribe send a blank email to
%> %email.unsub%%.

  Return to Index