How to get username on IIS run intranet (ASP)

P

Primoz Bradac

I have a .ASP page I'd like to make accessible only to selected users
who are logged on Windows workstations. The .ASP page is running under
IIS on a Windows 2003 Server (intranet).

Is there a way I could get to the username who requested the ASP page
(in the script of the .ASP page)?

TIA,
Primoz
 
E

Evertjan.

Primoz Bradac wrote on 12 aug 2008 in
microsoft.public.inetserver.asp.general:
I have a .ASP page I'd like to make accessible only to selected users
who are logged on Windows workstations. The .ASP page is running under
IIS on a Windows 2003 Server (intranet).

Is there a way I could get to the username who requested the ASP page
(in the script of the .ASP page)?

The user browser usually has no access to the settings of that
pc/workstation, and the ASP runs on the server with it's own autorisation,
independent of the windows autorisation of the user.

Better do a seperate login, or check the local ip.
 
P

Primoz Bradac

the windows autorisation of the user
Thank you Evertjan for your answer!

My question was a little unclear. Of course server script can't access
workstation data. I just wondered if there is some "magic" way (eg. by
client script) to access user data in an *intranet* environment.

I'll go the separate login way...

Primoz
 
B

Bob Barrows [MVP]

Primoz said:
I have a .ASP page I'd like to make accessible only to selected users
who are logged on Windows workstations. The .ASP page is running under
IIS on a Windows 2003 Server (intranet).

Is there a way I could get to the username who requested the ASP page
(in the script of the .ASP page)?
Of course there is. Use IIS Manager to turn off Anonymous Access and turn on
Integrated Security (this is done on the Directory Security tab of the
website Property pages, using the Edit button in the Anonymous Access and
authentication control section).

Once y9ou have done this, the user name will be in the LOGON_USER
servervariable:

Response.Write Request.ServerVariables("LOGON_USER")
 
E

Evertjan.

Bob Barrows [MVP] wrote on 12 aug 2008 in
microsoft.public.inetserver.asp.general:
Of course there is. Use IIS Manager to turn off Anonymous Access and
turn on Integrated Security (this is done on the Directory Security
tab of the website Property pages, using the Edit button in the
Anonymous Access and authentication control section).

Once y9ou have done this, the user name will be in the LOGON_USER
servervariable:

Response.Write Request.ServerVariables("LOGON_USER")

While this is true, Bob,
I doubt if Primoz wants to change the whole IIS server,
[as this will prohibit any anonimous pages, meseems?]
but maybe I read the intentions wrongly.
 
B

Bob Barrows [MVP]

Evertjan. said:
Bob Barrows [MVP] wrote on 12 aug 2008 in
microsoft.public.inetserver.asp.general:
Of course there is. Use IIS Manager to turn off Anonymous Access and
turn on Integrated Security (this is done on the Directory Security
tab of the website Property pages, using the Edit button in the
Anonymous Access and authentication control section).

Once y9ou have done this, the user name will be in the LOGON_USER
servervariable:

Response.Write Request.ServerVariables("LOGON_USER")

While this is true, Bob,
I doubt if Primoz wants to change the whole IIS server,
[as this will prohibit any anonimous pages, meseems?]
but maybe I read the intentions wrongly.
I left out the part where he should change the properties of the
specific website ... sorry.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top