Connecting Tech Pros Worldwide Help | Site Map

How to get username on IIS run intranet (ASP)

 
LinkBack Thread Tools Search this Thread
  #1  
Old August 12th, 2008, 09:25 AM
Primoz Bradac
Guest
 
Posts: n/a
Default How to get username on IIS run intranet (ASP)

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

  #2  
Old August 12th, 2008, 09:45 AM
Evertjan.
Guest
 
Posts: n/a
Default Re: How to get username on IIS run intranet (ASP)

Primoz Bradac wrote on 12 aug 2008 in
microsoft.public.inetserver.asp.general:
Quote:
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.


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
  #3  
Old August 12th, 2008, 10:05 AM
Primoz Bradac
Guest
 
Posts: n/a
Default Re: How to get username on IIS run intranet (ASP)

In article <Xns9AF875FD57E66eejj99@194.109.133.242>,
exjxw.hannivoort@interxnl.net says...
Quote:
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
  #4  
Old August 12th, 2008, 11:15 AM
Bob Barrows [MVP]
Guest
 
Posts: n/a
Default Re: How to get username on IIS run intranet (ASP)

Primoz Bradac wrote:
Quote:
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")

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


  #5  
Old August 12th, 2008, 01:35 PM
Evertjan.
Guest
 
Posts: n/a
Default Re: How to get username on IIS run intranet (ASP)

Bob Barrows [MVP] wrote on 12 aug 2008 in
microsoft.public.inetserver.asp.general:
Quote:
Primoz Bradac wrote:
Quote:
>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")
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.



--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
  #6  
Old August 12th, 2008, 01:55 PM
Bob Barrows [MVP]
Guest
 
Posts: n/a
Default Re: How to get username on IIS run intranet (ASP)

Evertjan. wrote:
Quote:
Bob Barrows [MVP] wrote on 12 aug 2008 in
microsoft.public.inetserver.asp.general:
>
Quote:
>Primoz Bradac wrote:
Quote:
>>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")
>
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.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.