Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Getting usernames with IIS

by qadwjoh (Scribe)
on Apr 11, 2003 at 08:53 UTC ( [id://249834] : perlquestion . print w/replies, xml ) Need Help??

qadwjoh has asked for the wisdom of the Perl Monks concerning the following question:


I have protected my site (which contains Perl CGI scripts and is served by IIS) as per this node. As far as I can tell, the authentication works, but is handled transparently by IIS - ie. users aren't presented with a username/password dialogue, but simply logged in automatically.

But now I have another problem - I need to get the username of the person who's currently accessing the site.

Does anyone know how to do this?


Replies are listed 'Best First'.
Re: Getting usernames with IIS
by DrManhattan (Chaplain) on Apr 11, 2003 at 09:56 UTC
    If IIS sets up the environment the same way apache does, you should be able to use $ENV{REMOTE_USER}.


Re: Getting usernames with IIS
by benn (Vicar) on Apr 11, 2003 at 10:05 UTC
    ....or with, you could use the remote_user() method.

      Oh yeah, I'd forgotten about that...

      thanks lads,